Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / cxx11-vtable-key-function.cpp
blob45dcad0b0b8ec999898e53f9a91d4f9d7e4a8022
1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -std=c++11 | FileCheck %s
2 // PR13424
4 namespace Test1 {
5 struct X {
6 virtual ~X(); // Key function.
7 virtual void f(); // Not a key function.
8 };
10 X::~X() = default;
12 // Verify that the vtable is emitted.
13 // CHECK-DAG: @_ZTVN5Test11XE ={{.*}} unnamed_addr constant
16 namespace Test2 {
17 struct X {
18 virtual ~X() = default; // Not a key function.
19 virtual void f(); // Key function.
22 void X::f() {}
24 // Verify that the vtable is emitted.
25 // CHECK-DAG: @_ZTVN5Test21XE ={{.*}} unnamed_addr constant
28 namespace Test3 {
29 struct X {
30 virtual ~X() = delete; // Not a key function.
31 virtual void f(); // Key function.
34 void X::f() {}
36 // Verify that the vtable is emitted.
37 // CHECK-DAG: @_ZTVN5Test31XE ={{.*}} unnamed_addr constant