diff options
Diffstat (limited to 'clang/test/CodeGenCXX')
-rw-r--r-- | clang/test/CodeGenCXX/exceptions-no-rtti.cpp | 10 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/key-function-vtable.cpp | 4 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/rtti-linkage.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/thunks.cpp | 7 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/virt-template-vtable.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/vtable-key-function.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/vtable-linkage.cpp | 17 |
7 files changed, 29 insertions, 15 deletions
diff --git a/clang/test/CodeGenCXX/exceptions-no-rtti.cpp b/clang/test/CodeGenCXX/exceptions-no-rtti.cpp index 01be1cc4b06..66b4c4ac33b 100644 --- a/clang/test/CodeGenCXX/exceptions-no-rtti.cpp +++ b/clang/test/CodeGenCXX/exceptions-no-rtti.cpp @@ -1,10 +1,10 @@ // RUN: %clang_cc1 -fno-rtti -fexceptions %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s -// CHECK: @_ZTIN5test11AE = weak_odr hidden constant -// CHECK: @_ZTIN5test11BE = weak_odr hidden constant -// CHECK: @_ZTIN5test11CE = weak_odr hidden constant -// CHECK: @_ZTIN5test11DE = weak_odr hidden constant -// CHECK: @_ZTIPN5test11DE = weak_odr hidden constant {{.*}} @_ZTIN5test11DE +// CHECK: @_ZTIN5test11AE = weak_odr constant +// CHECK: @_ZTIN5test11BE = weak_odr constant +// CHECK: @_ZTIN5test11CE = weak_odr constant +// CHECK: @_ZTIN5test11DE = weak_odr constant +// CHECK: @_ZTIPN5test11DE = weak_odr constant {{.*}} @_ZTIN5test11DE // PR6974: this shouldn't crash namespace test0 { diff --git a/clang/test/CodeGenCXX/key-function-vtable.cpp b/clang/test/CodeGenCXX/key-function-vtable.cpp index e71fba692f8..15c058da946 100644 --- a/clang/test/CodeGenCXX/key-function-vtable.cpp +++ b/clang/test/CodeGenCXX/key-function-vtable.cpp @@ -47,5 +47,5 @@ void use_X1(X1 *x1) { x1->f(); } // CHECK: @_ZTV5testa = constant [3 x i8*] [i8* null // CHECK: @_ZTV5testc = weak_odr constant [3 x i8*] [i8* null // CHECK: @_ZTVN12_GLOBAL__N_15testgE = internal constant [3 x i8*] [i8* null -// CHECK: @_ZTV5teste = weak_odr hidden constant [3 x i8*] [i8* null -// CHECK: @_ZTV5testb = weak_odr hidden constant [3 x i8*] [i8* null +// CHECK: @_ZTV5teste = weak_odr constant [3 x i8*] [i8* null +// CHECK: @_ZTV5testb = weak_odr constant [3 x i8*] [i8* null diff --git a/clang/test/CodeGenCXX/rtti-linkage.cpp b/clang/test/CodeGenCXX/rtti-linkage.cpp index 49d1c1f5f31..efa336dda4e 100644 --- a/clang/test/CodeGenCXX/rtti-linkage.cpp +++ b/clang/test/CodeGenCXX/rtti-linkage.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -o - | sort | FileCheck %s +// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -fhidden-weak-vtables -emit-llvm -o - | sort | FileCheck %s // FIXME: Fails on Win32, dunno why. // XFAIL: win32 diff --git a/clang/test/CodeGenCXX/thunks.cpp b/clang/test/CodeGenCXX/thunks.cpp index 5ecaacb16a9..ba60385ab6f 100644 --- a/clang/test/CodeGenCXX/thunks.cpp +++ b/clang/test/CodeGenCXX/thunks.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fhidden-weak-vtables -emit-llvm -o - | FileCheck -check-prefix=HIDDEN %s namespace Test1 { @@ -251,8 +252,8 @@ namespace Test10 { struct B { virtual void foo(); }; struct C : A, B { void foo() {} }; - // CHECK: define linkonce_odr void @_ZN6Test101C3fooEv - // CHECK: define linkonce_odr hidden void @_ZThn8_N6Test101C3fooEv + // CHECK-HIDDEN: define linkonce_odr void @_ZN6Test101C3fooEv + // CHECK-HIDDEN: define linkonce_odr hidden void @_ZThn8_N6Test101C3fooEv void test() { C c; @@ -262,5 +263,5 @@ namespace Test10 { /**** The following has to go at the end of the file ****/ // This is from Test5: -// CHECK: define linkonce_odr hidden void @_ZTv0_n24_N5Test51B1fEv +// CHECK: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv // CHECK: define internal void @_ZThn8_N12_GLOBAL__N_11C1fEv( diff --git a/clang/test/CodeGenCXX/virt-template-vtable.cpp b/clang/test/CodeGenCXX/virt-template-vtable.cpp index b9558283127..d60cfb9043a 100644 --- a/clang/test/CodeGenCXX/virt-template-vtable.cpp +++ b/clang/test/CodeGenCXX/virt-template-vtable.cpp @@ -16,7 +16,7 @@ extern template class A<short>; template class A<short>; -// CHECK: @_ZTV1B = weak_odr hidden constant +// CHECK: @_ZTV1B = weak_odr constant // CHECK: @_ZTV1AIlE = weak_odr constant // CHECK: @_ZTV1AIsE = weak_odr constant // CHECK: @_ZTV1AIiE = weak_odr constant diff --git a/clang/test/CodeGenCXX/vtable-key-function.cpp b/clang/test/CodeGenCXX/vtable-key-function.cpp index bdcab230c6f..97a546f8c93 100644 --- a/clang/test/CodeGenCXX/vtable-key-function.cpp +++ b/clang/test/CodeGenCXX/vtable-key-function.cpp @@ -9,7 +9,7 @@ struct A { // A does not have a key function, so the first constructor we emit should // cause the vtable to be defined (without assertions.) -// CHECK: @_ZTVN6PR56971AE = weak_odr hidden constant +// CHECK: @_ZTVN6PR56971AE = weak_odr constant A::A() { } A::A(int) { } } diff --git a/clang/test/CodeGenCXX/vtable-linkage.cpp b/clang/test/CodeGenCXX/vtable-linkage.cpp index 6c1301bee1e..cf988d13122 100644 --- a/clang/test/CodeGenCXX/vtable-linkage.cpp +++ b/clang/test/CodeGenCXX/vtable-linkage.cpp @@ -1,10 +1,14 @@ // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o %t +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fhidden-weak-vtables -emit-llvm -o %t.hidden // RUN: FileCheck --check-prefix=CHECK-1 %s < %t // RUN: FileCheck --check-prefix=CHECK-2 %s < %t +// RUN: FileCheck --check-prefix=CHECK-2-HIDDEN %s < %t.hidden // RUN: FileCheck --check-prefix=CHECK-3 %s < %t // RUN: FileCheck --check-prefix=CHECK-4 %s < %t // RUN: FileCheck --check-prefix=CHECK-5 %s < %t +// RUN: FileCheck --check-prefix=CHECK-5-HIDDEN %s < %t.hidden // RUN: FileCheck --check-prefix=CHECK-6 %s < %t +// RUN: FileCheck --check-prefix=CHECK-6-HIDDEN %s < %t.hidden // RUN: FileCheck --check-prefix=CHECK-7 %s < %t // RUN: FileCheck --check-prefix=CHECK-8 %s < %t // RUN: FileCheck --check-prefix=CHECK-9 %s < %t @@ -99,9 +103,12 @@ void use_F() { // C has no key function, so its vtable should have weak_odr linkage // and hidden visibility (rdar://problem/7523229). -// CHECK-2: @_ZTV1C = weak_odr hidden constant +// CHECK-2: @_ZTV1C = weak_odr constant // CHECK-2: @_ZTS1C = weak_odr constant -// CHECK-2: @_ZTI1C = weak_odr hidden constant +// CHECK-2: @_ZTI1C = weak_odr constant +// CHECK-2-HIDDEN: @_ZTV1C = weak_odr hidden constant +// CHECK-2-HIDDEN: @_ZTS1C = weak_odr constant +// CHECK-2-HIDDEN: @_ZTI1C = weak_odr hidden constant // D has a key function that is defined in this translation unit so its vtable is // defined in the translation unit. @@ -122,12 +129,18 @@ void use_F() { // CHECK-5: @_ZTV1EIsE = weak_odr constant // CHECK-5: @_ZTS1EIsE = weak_odr constant // CHECK-5: @_ZTI1EIsE = weak_odr constant +// CHECK-5-HIDDEN: @_ZTV1EIsE = weak_odr constant +// CHECK-5-HIDDEN: @_ZTS1EIsE = weak_odr constant +// CHECK-5-HIDDEN: @_ZTI1EIsE = weak_odr constant // F<short> is an explicit template instantiation without a key // function, so its vtable should have weak_odr linkage // CHECK-6: @_ZTV1FIsE = weak_odr constant // CHECK-6: @_ZTS1FIsE = weak_odr constant // CHECK-6: @_ZTI1FIsE = weak_odr constant +// CHECK-6-HIDDEN: @_ZTV1FIsE = weak_odr constant +// CHECK-6-HIDDEN: @_ZTS1FIsE = weak_odr constant +// CHECK-6-HIDDEN: @_ZTI1FIsE = weak_odr constant // E<long> is an implicit template instantiation with a key function // defined in this translation unit, so its vtable should have |