diff options
author | dim <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/CodeGenCXX/vtable-linkage.cpp | |
parent | 38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff) | |
download | FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz |
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
Diffstat (limited to 'test/CodeGenCXX/vtable-linkage.cpp')
-rw-r--r-- | test/CodeGenCXX/vtable-linkage.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/test/CodeGenCXX/vtable-linkage.cpp b/test/CodeGenCXX/vtable-linkage.cpp index 9c08b30..5cbd389 100644 --- a/test/CodeGenCXX/vtable-linkage.cpp +++ b/test/CodeGenCXX/vtable-linkage.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o %t +// RUN: %clang_cc1 %s -triple=x86_64-pc-linux -emit-llvm -o %t // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -disable-llvm-optzns -O3 -emit-llvm -o %t.opt // RUN: FileCheck --check-prefix=CHECK %s < %t // RUN: FileCheck --check-prefix=CHECK-OPT %s < %t.opt @@ -89,10 +89,10 @@ void use_F() { // C has no key function, so its vtable should have weak_odr linkage // and hidden visibility (rdar://problem/7523229). -// CHECK-DAG: @_ZTV1C = linkonce_odr unnamed_addr constant -// CHECK-DAG: @_ZTS1C = linkonce_odr constant -// CHECK-DAG: @_ZTI1C = linkonce_odr constant -// CHECK-DAG: @_ZTT1C = linkonce_odr unnamed_addr constant +// CHECK-DAG: @_ZTV1C = linkonce_odr unnamed_addr constant {{.*}}, comdat, +// CHECK-DAG: @_ZTS1C = linkonce_odr constant {{.*}}, comdat{{$}} +// CHECK-DAG: @_ZTI1C = linkonce_odr constant {{.*}}, comdat{{$}} +// CHECK-DAG: @_ZTT1C = linkonce_odr unnamed_addr constant {{.*}}, comdat{{$}} // D has a key function that is defined in this translation unit so its vtable is // defined in the translation unit. @@ -110,28 +110,28 @@ void use_F() { // E<short> is an explicit template instantiation with a key function // defined in this translation unit, so its vtable should have // weak_odr linkage. -// CHECK-DAG: @_ZTV1EIsE = weak_odr unnamed_addr constant -// CHECK-DAG: @_ZTS1EIsE = weak_odr constant -// CHECK-DAG: @_ZTI1EIsE = weak_odr constant +// CHECK-DAG: @_ZTV1EIsE = weak_odr unnamed_addr constant {{.*}}, comdat, +// CHECK-DAG: @_ZTS1EIsE = weak_odr constant {{.*}}, comdat{{$}} +// CHECK-DAG: @_ZTI1EIsE = weak_odr constant {{.*}}, comdat{{$}} // F<short> is an explicit template instantiation without a key // function, so its vtable should have weak_odr linkage -// CHECK-DAG: @_ZTV1FIsE = weak_odr unnamed_addr constant -// CHECK-DAG: @_ZTS1FIsE = weak_odr constant -// CHECK-DAG: @_ZTI1FIsE = weak_odr constant +// CHECK-DAG: @_ZTV1FIsE = weak_odr unnamed_addr constant {{.*}}, comdat, +// CHECK-DAG: @_ZTS1FIsE = weak_odr constant {{.*}}, comdat{{$}} +// CHECK-DAG: @_ZTI1FIsE = weak_odr constant {{.*}}, comdat{{$}} // E<long> is an implicit template instantiation with a key function // defined in this translation unit, so its vtable should have // linkonce_odr linkage. -// CHECK-DAG: @_ZTV1EIlE = linkonce_odr unnamed_addr constant -// CHECK-DAG: @_ZTS1EIlE = linkonce_odr constant -// CHECK-DAG: @_ZTI1EIlE = linkonce_odr constant +// CHECK-DAG: @_ZTV1EIlE = linkonce_odr unnamed_addr constant {{.*}}, comdat, +// CHECK-DAG: @_ZTS1EIlE = linkonce_odr constant {{.*}}, comdat{{$}} +// CHECK-DAG: @_ZTI1EIlE = linkonce_odr constant {{.*}}, comdat{{$}} // F<long> is an implicit template instantiation with no key function, // so its vtable should have linkonce_odr linkage. -// CHECK-DAG: @_ZTV1FIlE = linkonce_odr unnamed_addr constant -// CHECK-DAG: @_ZTS1FIlE = linkonce_odr constant -// CHECK-DAG: @_ZTI1FIlE = linkonce_odr constant +// CHECK-DAG: @_ZTV1FIlE = linkonce_odr unnamed_addr constant {{.*}}, comdat, +// CHECK-DAG: @_ZTS1FIlE = linkonce_odr constant {{.*}}, comdat{{$}} +// CHECK-DAG: @_ZTI1FIlE = linkonce_odr constant {{.*}}, comdat{{$}} // F<int> is an explicit template instantiation declaration without a // key function, so its vtable should have external linkage. @@ -158,11 +158,11 @@ void use_F() { // F<char> is an explicit specialization without a key function, so // its vtable should have linkonce_odr linkage. -// CHECK-DAG: @_ZTV1FIcE = linkonce_odr unnamed_addr constant -// CHECK-DAG: @_ZTS1FIcE = linkonce_odr constant -// CHECK-DAG: @_ZTI1FIcE = linkonce_odr constant +// CHECK-DAG: @_ZTV1FIcE = linkonce_odr unnamed_addr constant {{.*}}, comdat, +// CHECK-DAG: @_ZTS1FIcE = linkonce_odr constant {{.*}}, comdat{{$}} +// CHECK-DAG: @_ZTI1FIcE = linkonce_odr constant {{.*}}, comdat{{$}} -// CHECK-DAG: @_ZTV1GIiE = linkonce_odr unnamed_addr constant +// CHECK-DAG: @_ZTV1GIiE = linkonce_odr unnamed_addr constant {{.*}}, comdat, template <typename T> class G { public: @@ -178,7 +178,7 @@ void G_f0() { new G<int>(); } // H<int> has a key function without a body but it's a template instantiation // so its VTable must be emitted. -// CHECK-DAG: @_ZTV1HIiE = linkonce_odr unnamed_addr constant +// CHECK-DAG: @_ZTV1HIiE = linkonce_odr unnamed_addr constant {{.*}}, comdat, template <typename T> class H { public: |