From c174fe5f125f749eaf5ea7cc41f3cbf049bc5ada Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 8 Feb 2014 03:26:05 +0000 Subject: [PATCH] type_info objects are not unnamed_addr: the ABI requires us to unique them and permits the implementation of dynamic_cast (and anything else which knows it's working with a complete class type) to compare their addresses directly. rdar://16005328 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201020 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGRTTI.cpp | 23 ++-- test/CodeGenCXX/exceptions-no-rtti.cpp | 10 +- test/CodeGenCXX/rtti-fundamental.cpp | 120 +++++++++--------- test/CodeGenCXX/rtti-linkage.cpp | 46 +++---- test/CodeGenCXX/rtti-visibility.cpp | 6 +- test/CodeGenCXX/type_visibility.cpp | 36 +++--- test/CodeGenCXX/virt-dtor-key.cpp | 2 +- test/CodeGenCXX/visibility-ms-compat.cpp | 12 +- .../vtable-available-externally.cpp | 2 +- test/CodeGenCXX/vtable-key-function-arm.cpp | 24 ++-- test/CodeGenCXX/vtable-key-function-ios.cpp | 16 +-- test/CodeGenCXX/vtable-linkage.cpp | 20 +-- test/CodeGenCXX/weak-extern-typeinfo.cpp | 14 +- test/CodeGenObjCXX/rtti.mm | 14 +- test/SemaCXX/typeid-ref.cpp | 2 +- 15 files changed, 177 insertions(+), 170 deletions(-) diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp index 351b9fc4e2..455ee972f5 100644 --- a/lib/CodeGen/CGRTTI.cpp +++ b/lib/CodeGen/CGRTTI.cpp @@ -644,6 +644,21 @@ llvm::Constant *RTTIBuilder::BuildTypeInfo(QualType Ty, bool Force) { OldGV->eraseFromParent(); } + // The Itanium ABI specifies that type_info objects must be globally + // unique, with one exception: if the type is an incomplete class + // type or a (possibly indirect) pointer to one. That exception + // affects the general case of comparing type_info objects produced + // by the typeid operator, which is why the comparison operators on + // std::type_info generally use the type_info name pointers instead + // of the object addresses. However, the language's built-in uses + // of RTTI generally require class types to be complete, even when + // manipulating pointers to those class types. This allows the + // implementation of dynamic_cast to rely on address equality tests, + // which is much faster. + + // All of this is to say that it's important that both the type_info + // object and the type_info name be uniqued when weakly emitted. + // Give the type_info object and name the formal visibility of the // type itself. Visibility formalVisibility = Ty->getVisibility(); @@ -652,14 +667,6 @@ llvm::Constant *RTTIBuilder::BuildTypeInfo(QualType Ty, bool Force) { TypeName->setVisibility(llvmVisibility); GV->setVisibility(llvmVisibility); - // Contra the Itanium ABI, we do not rely or guarantee strict - // address-equivalence of type_info objects. - // - // The main effect of setting this flag is that LLVM will - // automatically decrease the visibility of linkonce_odr type_info - // objects. - GV->setUnnamedAddr(true); - return llvm::ConstantExpr::getBitCast(GV, CGM.Int8PtrTy); } diff --git a/test/CodeGenCXX/exceptions-no-rtti.cpp b/test/CodeGenCXX/exceptions-no-rtti.cpp index 902d6ac297..e1ef4f1dda 100644 --- a/test/CodeGenCXX/exceptions-no-rtti.cpp +++ b/test/CodeGenCXX/exceptions-no-rtti.cpp @@ -1,10 +1,10 @@ // RUN: %clang_cc1 -fno-rtti -fcxx-exceptions -fexceptions %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s -// CHECK: @_ZTIN5test11AE = linkonce_odr unnamed_addr constant -// CHECK: @_ZTIN5test11BE = linkonce_odr unnamed_addr constant -// CHECK: @_ZTIN5test11CE = linkonce_odr unnamed_addr constant -// CHECK: @_ZTIN5test11DE = linkonce_odr unnamed_addr constant -// CHECK: @_ZTIPN5test11DE = linkonce_odr unnamed_addr constant {{.*}} @_ZTIN5test11DE +// CHECK: @_ZTIN5test11AE = linkonce_odr constant +// CHECK: @_ZTIN5test11BE = linkonce_odr constant +// CHECK: @_ZTIN5test11CE = linkonce_odr constant +// CHECK: @_ZTIN5test11DE = linkonce_odr constant +// CHECK: @_ZTIPN5test11DE = linkonce_odr constant {{.*}} @_ZTIN5test11DE // PR6974: this shouldn't crash namespace test0 { diff --git a/test/CodeGenCXX/rtti-fundamental.cpp b/test/CodeGenCXX/rtti-fundamental.cpp index 2495e969bf..14297b68cf 100644 --- a/test/CodeGenCXX/rtti-fundamental.cpp +++ b/test/CodeGenCXX/rtti-fundamental.cpp @@ -15,102 +15,102 @@ namespace __cxxabiv1 { } // void -// CHECK: @_ZTIv = unnamed_addr constant -// CHECK: @_ZTIPv = unnamed_addr constant -// CHECK: @_ZTIPKv = unnamed_addr constant +// CHECK: @_ZTIv = constant +// CHECK: @_ZTIPv = constant +// CHECK: @_ZTIPKv = constant // std::nullptr_t -// CHECK: @_ZTIDn = unnamed_addr constant -// CHECK: @_ZTIPDn = unnamed_addr constant -// CHECK: @_ZTIPKDn = unnamed_addr constant +// CHECK: @_ZTIDn = constant +// CHECK: @_ZTIPDn = constant +// CHECK: @_ZTIPKDn = constant // bool -// CHECK: @_ZTIb = unnamed_addr constant -// CHECK: @_ZTIPb = unnamed_addr constant -// CHECK: @_ZTIPKb = unnamed_addr constant +// CHECK: @_ZTIb = constant +// CHECK: @_ZTIPb = constant +// CHECK: @_ZTIPKb = constant // wchar_t -// CHECK: @_ZTIw = unnamed_addr constant -// CHECK: @_ZTIPw = unnamed_addr constant -// CHECK: @_ZTIPKw = unnamed_addr constant +// CHECK: @_ZTIw = constant +// CHECK: @_ZTIPw = constant +// CHECK: @_ZTIPKw = constant // char -// CHECK: @_ZTIc = unnamed_addr constant -// CHECK: @_ZTIPc = unnamed_addr constant -// CHECK: @_ZTIPKc = unnamed_addr constant +// CHECK: @_ZTIc = constant +// CHECK: @_ZTIPc = constant +// CHECK: @_ZTIPKc = constant // unsigned char -// CHECK: @_ZTIh = unnamed_addr constant -// CHECK: @_ZTIPh = unnamed_addr constant -// CHECK: @_ZTIPKh = unnamed_addr constant +// CHECK: @_ZTIh = constant +// CHECK: @_ZTIPh = constant +// CHECK: @_ZTIPKh = constant // signed char -// CHECK: @_ZTIa = unnamed_addr constant -// CHECK: @_ZTIPa = unnamed_addr constant -// CHECK: @_ZTIPKa = unnamed_addr constant +// CHECK: @_ZTIa = constant +// CHECK: @_ZTIPa = constant +// CHECK: @_ZTIPKa = constant // short -// CHECK: @_ZTIs = unnamed_addr constant -// CHECK: @_ZTIPs = unnamed_addr constant -// CHECK: @_ZTIPKs = unnamed_addr constant +// CHECK: @_ZTIs = constant +// CHECK: @_ZTIPs = constant +// CHECK: @_ZTIPKs = constant // unsigned short -// CHECK: @_ZTIt = unnamed_addr constant -// CHECK: @_ZTIPt = unnamed_addr constant -// CHECK: @_ZTIPKt = unnamed_addr constant +// CHECK: @_ZTIt = constant +// CHECK: @_ZTIPt = constant +// CHECK: @_ZTIPKt = constant // int -// CHECK: @_ZTIi = unnamed_addr constant -// CHECK: @_ZTIPi = unnamed_addr constant -// CHECK: @_ZTIPKi = unnamed_addr constant +// CHECK: @_ZTIi = constant +// CHECK: @_ZTIPi = constant +// CHECK: @_ZTIPKi = constant // unsigned int -// CHECK: @_ZTIj = unnamed_addr constant -// CHECK: @_ZTIPj = unnamed_addr constant -// CHECK: @_ZTIPKj = unnamed_addr constant +// CHECK: @_ZTIj = constant +// CHECK: @_ZTIPj = constant +// CHECK: @_ZTIPKj = constant // long -// CHECK: @_ZTIl = unnamed_addr constant -// CHECK: @_ZTIPl = unnamed_addr constant -// CHECK: @_ZTIPKl = unnamed_addr constant +// CHECK: @_ZTIl = constant +// CHECK: @_ZTIPl = constant +// CHECK: @_ZTIPKl = constant // unsigned long -// CHECK: @_ZTIm = unnamed_addr constant -// CHECK: @_ZTIPm = unnamed_addr constant -// CHECK: @_ZTIPKm = unnamed_addr constant +// CHECK: @_ZTIm = constant +// CHECK: @_ZTIPm = constant +// CHECK: @_ZTIPKm = constant // long long -// CHECK: @_ZTIx = unnamed_addr constant -// CHECK: @_ZTIPx = unnamed_addr constant -// CHECK: @_ZTIPKx = unnamed_addr constant +// CHECK: @_ZTIx = constant +// CHECK: @_ZTIPx = constant +// CHECK: @_ZTIPKx = constant // unsigned long long -// CHECK: @_ZTIy = unnamed_addr constant -// CHECK: @_ZTIPy = unnamed_addr constant -// CHECK: @_ZTIPKy = unnamed_addr constant +// CHECK: @_ZTIy = constant +// CHECK: @_ZTIPy = constant +// CHECK: @_ZTIPKy = constant // float -// CHECK: @_ZTIf = unnamed_addr constant -// CHECK: @_ZTIPf = unnamed_addr constant -// CHECK: @_ZTIPKf = unnamed_addr constant +// CHECK: @_ZTIf = constant +// CHECK: @_ZTIPf = constant +// CHECK: @_ZTIPKf = constant // double -// CHECK: @_ZTId = unnamed_addr constant -// CHECK: @_ZTIPd = unnamed_addr constant -// CHECK: @_ZTIPKd = unnamed_addr constant +// CHECK: @_ZTId = constant +// CHECK: @_ZTIPd = constant +// CHECK: @_ZTIPKd = constant // long double -// CHECK: @_ZTIe = unnamed_addr constant -// CHECK: @_ZTIPe = unnamed_addr constant -// CHECK: @_ZTIPKe = unnamed_addr constant +// CHECK: @_ZTIe = constant +// CHECK: @_ZTIPe = constant +// CHECK: @_ZTIPKe = constant // char16_t -// CHECK: @_ZTIDs = unnamed_addr constant -// CHECK: @_ZTIPDs = unnamed_addr constant -// CHECK: @_ZTIPKDs = unnamed_addr constant +// CHECK: @_ZTIDs = constant +// CHECK: @_ZTIPDs = constant +// CHECK: @_ZTIPKDs = constant // char32_t -// CHECK: @_ZTIDi = unnamed_addr constant -// CHECK: @_ZTIPDi = unnamed_addr constant -// CHECK: @_ZTIPKDi = unnamed_addr constant +// CHECK: @_ZTIDi = constant +// CHECK: @_ZTIPDi = constant +// CHECK: @_ZTIPKDi = constant diff --git a/test/CodeGenCXX/rtti-linkage.cpp b/test/CodeGenCXX/rtti-linkage.cpp index f1a0c80373..3eaf133bd6 100644 --- a/test/CodeGenCXX/rtti-linkage.cpp +++ b/test/CodeGenCXX/rtti-linkage.cpp @@ -6,50 +6,50 @@ // CHECK-WITH-HIDDEN: _ZTSFN12_GLOBAL__N_11DEvE = internal constant // CHECK-WITH-HIDDEN: @_ZTSPK2T4 = linkonce_odr hidden constant // CHECK-WITH-HIDDEN: @_ZTS2T4 = linkonce_odr hidden constant -// CHECK-WITH-HIDDEN: @_ZTI2T4 = linkonce_odr hidden unnamed_addr constant -// CHECK-WITH-HIDDEN: @_ZTIPK2T4 = linkonce_odr hidden unnamed_addr constant +// CHECK-WITH-HIDDEN: @_ZTI2T4 = linkonce_odr hidden constant +// CHECK-WITH-HIDDEN: @_ZTIPK2T4 = linkonce_odr hidden constant // CHECK: _ZTSP1C = internal constant // CHECK: _ZTS1C = internal constant -// CHECK: _ZTI1C = internal unnamed_addr constant -// CHECK: _ZTIP1C = internal unnamed_addr constant +// CHECK: _ZTI1C = internal constant +// CHECK: _ZTIP1C = internal constant // CHECK: _ZTSPP1C = internal constant -// CHECK: _ZTIPP1C = internal unnamed_addr constant +// CHECK: _ZTIPP1C = internal constant // CHECK: _ZTSM1Ci = internal constant -// CHECK: _ZTIM1Ci = internal unnamed_addr constant +// CHECK: _ZTIM1Ci = internal constant // CHECK: _ZTSPM1Ci = internal constant -// CHECK: _ZTIPM1Ci = internal unnamed_addr constant +// CHECK: _ZTIPM1Ci = internal constant // CHECK: _ZTSM1CS_ = internal constant -// CHECK: _ZTIM1CS_ = internal unnamed_addr constant +// CHECK: _ZTIM1CS_ = internal constant // CHECK: _ZTSM1CPS_ = internal constant -// CHECK: _ZTIM1CPS_ = internal unnamed_addr constant +// CHECK: _ZTIM1CPS_ = internal constant // CHECK: _ZTSM1A1C = internal constant // CHECK: _ZTS1A = linkonce_odr constant -// CHECK: _ZTI1A = linkonce_odr unnamed_addr constant -// CHECK: _ZTIM1A1C = internal unnamed_addr constant +// CHECK: _ZTI1A = linkonce_odr constant +// CHECK: _ZTIM1A1C = internal constant // CHECK: _ZTSM1AP1C = internal constant -// CHECK: _ZTIM1AP1C = internal unnamed_addr constant +// CHECK: _ZTIM1AP1C = internal constant // CHECK: _ZTSN12_GLOBAL__N_11DE = internal constant -// CHECK: _ZTIN12_GLOBAL__N_11DE = internal unnamed_addr constant +// CHECK: _ZTIN12_GLOBAL__N_11DE = internal constant // CHECK: _ZTSPN12_GLOBAL__N_11DE = internal constant -// CHECK: _ZTIPN12_GLOBAL__N_11DE = internal unnamed_addr constant +// CHECK: _ZTIPN12_GLOBAL__N_11DE = internal constant // CHECK: _ZTSFN12_GLOBAL__N_11DEvE = internal constant -// CHECK: _ZTIFN12_GLOBAL__N_11DEvE = internal unnamed_addr constant +// CHECK: _ZTIFN12_GLOBAL__N_11DEvE = internal constant // CHECK: _ZTSFvN12_GLOBAL__N_11DEE = internal constant -// CHECK: _ZTIFvN12_GLOBAL__N_11DEE = internal unnamed_addr constant +// CHECK: _ZTIFvN12_GLOBAL__N_11DEE = internal constant // CHECK: _ZTSPFvvE = linkonce_odr constant // CHECK: _ZTSFvvE = linkonce_odr constant -// CHECK: _ZTIFvvE = linkonce_odr unnamed_addr constant -// CHECK: _ZTIPFvvE = linkonce_odr unnamed_addr constant +// CHECK: _ZTIFvvE = linkonce_odr constant +// CHECK: _ZTIPFvvE = linkonce_odr constant // CHECK: _ZTSN12_GLOBAL__N_11EE = internal constant -// CHECK: _ZTIN12_GLOBAL__N_11EE = internal unnamed_addr constant +// CHECK: _ZTIN12_GLOBAL__N_11EE = internal constant // CHECK: _ZTSA10_i = linkonce_odr constant -// CHECK: _ZTIA10_i = linkonce_odr unnamed_addr constant -// CHECK: _ZTI1TILj0EE = linkonce_odr unnamed_addr constant -// CHECK: _ZTI1TILj1EE = weak_odr unnamed_addr constant +// CHECK: _ZTIA10_i = linkonce_odr constant +// CHECK: _ZTI1TILj0EE = linkonce_odr constant +// CHECK: _ZTI1TILj1EE = weak_odr constant // CHECK: _ZTI1TILj2EE = external constant // CHECK: _ZTS1B = constant -// CHECK: _ZTI1B = unnamed_addr constant +// CHECK: _ZTI1B = constant // CHECK: _ZTS1F = linkonce_odr constant // CHECK: _ZTIN12_GLOBAL__N_11DE to diff --git a/test/CodeGenCXX/rtti-visibility.cpp b/test/CodeGenCXX/rtti-visibility.cpp index c4b206bc05..5945be5c73 100644 --- a/test/CodeGenCXX/rtti-visibility.cpp +++ b/test/CodeGenCXX/rtti-visibility.cpp @@ -7,9 +7,9 @@ namespace Test1 { // A is explicitly marked hidden, so all RTTI data should also be marked hidden. // CHECK-TEST1: @_ZTSN5Test11AE = linkonce_odr hidden constant - // CHECK-TEST1: @_ZTIN5Test11AE = linkonce_odr hidden unnamed_addr constant + // CHECK-TEST1: @_ZTIN5Test11AE = linkonce_odr hidden constant // CHECK-TEST1: @_ZTSPN5Test11AE = linkonce_odr hidden constant - // CHECK-TEST1: @_ZTIPN5Test11AE = linkonce_odr hidden unnamed_addr constant + // CHECK-TEST1: @_ZTIPN5Test11AE = linkonce_odr hidden constant struct __attribute__((visibility("hidden"))) A { }; void f() { @@ -21,7 +21,7 @@ namespace Test1 { namespace Test2 { // A is weak, so its linkage should be linkoce_odr, but not marked hidden. // CHECK-TEST2: @_ZTSN5Test21AE = linkonce_odr constant - // CHECK-TEST2: @_ZTIN5Test21AE = linkonce_odr unnamed_addr constant + // CHECK-TEST2: @_ZTIN5Test21AE = linkonce_odr constant struct A { }; void f() { (void)typeid(A); diff --git a/test/CodeGenCXX/type_visibility.cpp b/test/CodeGenCXX/type_visibility.cpp index 11e5091fd2..a7b7198a23 100644 --- a/test/CodeGenCXX/type_visibility.cpp +++ b/test/CodeGenCXX/type_visibility.cpp @@ -29,11 +29,11 @@ namespace temp0 { // FUNS-LABEL: define weak_odr void @_ZN5temp01BINS_1AEE3fooEv( // VARS: @_ZTVN5temp01BINS_1AEEE = weak_odr unnamed_addr constant // VARS: @_ZTSN5temp01BINS_1AEEE = weak_odr constant - // VARS: @_ZTIN5temp01BINS_1AEEE = weak_odr unnamed_addr constant + // VARS: @_ZTIN5temp01BINS_1AEEE = weak_odr constant // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp01BINS_1AEE3fooEv( // VARS-HIDDEN: @_ZTVN5temp01BINS_1AEEE = weak_odr hidden unnamed_addr constant // VARS-HIDDEN: @_ZTSN5temp01BINS_1AEEE = weak_odr hidden constant - // VARS-HIDDEN: @_ZTIN5temp01BINS_1AEEE = weak_odr hidden unnamed_addr constant + // VARS-HIDDEN: @_ZTIN5temp01BINS_1AEEE = weak_odr hidden constant } namespace temp1 { @@ -46,11 +46,11 @@ namespace temp1 { // FUNS-LABEL: define weak_odr void @_ZN5temp11BINS_1AEE3fooEv( // VARS: @_ZTVN5temp11BINS_1AEEE = weak_odr unnamed_addr constant // VARS: @_ZTSN5temp11BINS_1AEEE = weak_odr constant - // VARS: @_ZTIN5temp11BINS_1AEEE = weak_odr unnamed_addr constant + // VARS: @_ZTIN5temp11BINS_1AEEE = weak_odr constant // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp11BINS_1AEE3fooEv( // VARS-HIDDEN: @_ZTVN5temp11BINS_1AEEE = weak_odr unnamed_addr constant // VARS-HIDDEN: @_ZTSN5temp11BINS_1AEEE = weak_odr constant - // VARS-HIDDEN: @_ZTIN5temp11BINS_1AEEE = weak_odr unnamed_addr constant + // VARS-HIDDEN: @_ZTIN5temp11BINS_1AEEE = weak_odr constant } namespace temp2 { @@ -63,11 +63,11 @@ namespace temp2 { // FUNS-LABEL: define weak_odr void @_ZN5temp21BINS_1AEE3fooEv( // VARS: @_ZTVN5temp21BINS_1AEEE = weak_odr unnamed_addr constant // VARS: @_ZTSN5temp21BINS_1AEEE = weak_odr constant - // VARS: @_ZTIN5temp21BINS_1AEEE = weak_odr unnamed_addr constant + // VARS: @_ZTIN5temp21BINS_1AEEE = weak_odr constant // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp21BINS_1AEE3fooEv( // VARS-HIDDEN: @_ZTVN5temp21BINS_1AEEE = weak_odr hidden unnamed_addr constant // VARS-HIDDEN: @_ZTSN5temp21BINS_1AEEE = weak_odr hidden constant - // VARS-HIDDEN: @_ZTIN5temp21BINS_1AEEE = weak_odr hidden unnamed_addr constant + // VARS-HIDDEN: @_ZTIN5temp21BINS_1AEEE = weak_odr hidden constant } namespace temp3 { @@ -80,11 +80,11 @@ namespace temp3 { // FUNS-LABEL: define weak_odr hidden void @_ZN5temp31BINS_1AEE3fooEv( // VARS: @_ZTVN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant // VARS: @_ZTSN5temp31BINS_1AEEE = weak_odr hidden constant - // VARS: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant + // VARS: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden constant // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp31BINS_1AEE3fooEv( // VARS-HIDDEN: @_ZTVN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant // VARS-HIDDEN: @_ZTSN5temp31BINS_1AEEE = weak_odr hidden constant - // VARS-HIDDEN: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant + // VARS-HIDDEN: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden constant } namespace temp4 { @@ -97,11 +97,11 @@ namespace temp4 { // FUNS-LABEL: define weak_odr void @_ZN5temp41BINS_1AEE3fooEv( // VARS: @_ZTVN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant // VARS: @_ZTSN5temp41BINS_1AEEE = weak_odr hidden constant - // VARS: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant + // VARS: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden constant // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp41BINS_1AEE3fooEv( // VARS-HIDDEN: @_ZTVN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant // VARS-HIDDEN: @_ZTSN5temp41BINS_1AEEE = weak_odr hidden constant - // VARS-HIDDEN: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant + // VARS-HIDDEN: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden constant } namespace type0 { @@ -113,11 +113,11 @@ namespace type0 { // FUNS-LABEL: define void @_ZN5type01A3fooEv( // VARS: @_ZTVN5type01AE = unnamed_addr constant // VARS: @_ZTSN5type01AE = constant - // VARS: @_ZTIN5type01AE = unnamed_addr constant + // VARS: @_ZTIN5type01AE = constant // FUNS-HIDDEN-LABEL: define hidden void @_ZN5type01A3fooEv( // VARS-HIDDEN: @_ZTVN5type01AE = unnamed_addr constant // VARS-HIDDEN: @_ZTSN5type01AE = constant - // VARS-HIDDEN: @_ZTIN5type01AE = unnamed_addr constant + // VARS-HIDDEN: @_ZTIN5type01AE = constant } namespace type1 { @@ -129,11 +129,11 @@ namespace type1 { // FUNS-LABEL: define hidden void @_ZN5type11A3fooEv( // VARS: @_ZTVN5type11AE = unnamed_addr constant // VARS: @_ZTSN5type11AE = constant - // VARS: @_ZTIN5type11AE = unnamed_addr constant + // VARS: @_ZTIN5type11AE = constant // FUNS-HIDDEN-LABEL: define hidden void @_ZN5type11A3fooEv( // VARS-HIDDEN: @_ZTVN5type11AE = unnamed_addr constant // VARS-HIDDEN: @_ZTSN5type11AE = constant - // VARS-HIDDEN: @_ZTIN5type11AE = unnamed_addr constant + // VARS-HIDDEN: @_ZTIN5type11AE = constant } namespace type2 { @@ -145,11 +145,11 @@ namespace type2 { // FUNS-LABEL: define void @_ZN5type21A3fooEv( // VARS: @_ZTVN5type21AE = hidden unnamed_addr constant // VARS: @_ZTSN5type21AE = hidden constant - // VARS: @_ZTIN5type21AE = hidden unnamed_addr constant + // VARS: @_ZTIN5type21AE = hidden constant // FUNS-HIDDEN-LABEL: define hidden void @_ZN5type21A3fooEv( // VARS-HIDDEN: @_ZTVN5type21AE = hidden unnamed_addr constant // VARS-HIDDEN: @_ZTSN5type21AE = hidden constant - // VARS-HIDDEN: @_ZTIN5type21AE = hidden unnamed_addr constant + // VARS-HIDDEN: @_ZTIN5type21AE = hidden constant } namespace type3 { @@ -161,10 +161,10 @@ namespace type3 { // FUNS-LABEL: define void @_ZN5type31A3fooEv( // VARS: @_ZTVN5type31AE = hidden unnamed_addr constant // VARS: @_ZTSN5type31AE = hidden constant - // VARS: @_ZTIN5type31AE = hidden unnamed_addr constant + // VARS: @_ZTIN5type31AE = hidden constant // FUNS-HIDDEN-LABEL: define void @_ZN5type31A3fooEv( // VARS-HIDDEN: @_ZTVN5type31AE = hidden unnamed_addr constant // VARS-HIDDEN: @_ZTSN5type31AE = hidden constant - // VARS-HIDDEN: @_ZTIN5type31AE = hidden unnamed_addr constant + // VARS-HIDDEN: @_ZTIN5type31AE = hidden constant } diff --git a/test/CodeGenCXX/virt-dtor-key.cpp b/test/CodeGenCXX/virt-dtor-key.cpp index 22c1cd60e0..40c5a537cc 100644 --- a/test/CodeGenCXX/virt-dtor-key.cpp +++ b/test/CodeGenCXX/virt-dtor-key.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s -// CHECK: @_ZTI3foo = unnamed_addr constant +// CHECK: @_ZTI3foo = constant class foo { foo(); virtual ~foo(); diff --git a/test/CodeGenCXX/visibility-ms-compat.cpp b/test/CodeGenCXX/visibility-ms-compat.cpp index 25446cdf06..963b2a4e6d 100644 --- a/test/CodeGenCXX/visibility-ms-compat.cpp +++ b/test/CodeGenCXX/visibility-ms-compat.cpp @@ -27,7 +27,7 @@ namespace test0 { const std::type_info &ti = typeid(A); // CHECK-GLOBAL: @_ZTSN5test01AE = linkonce_odr constant - // CHECK-GLOBAL: @_ZTIN5test01AE = linkonce_odr unnamed_addr constant + // CHECK-GLOBAL: @_ZTIN5test01AE = linkonce_odr constant // CHECK-GLOBAL: @_ZN5test02tiE = hidden constant } @@ -43,7 +43,7 @@ namespace test1 { const std::type_info &ti = typeid(A); // CHECK-GLOBAL: @_ZTSN5test11AE = linkonce_odr hidden constant - // CHECK-GLOBAL: @_ZTIN5test11AE = linkonce_odr hidden unnamed_addr constant + // CHECK-GLOBAL: @_ZTIN5test11AE = linkonce_odr hidden constant // CHECK-GLOBAL: @_ZN5test12tiE = hidden constant } @@ -59,7 +59,7 @@ namespace test2 { const std::type_info &ti = typeid(A); // CHECK-GLOBAL: @_ZTSN5test21AE = linkonce_odr constant - // CHECK-GLOBAL: @_ZTIN5test21AE = linkonce_odr unnamed_addr constant + // CHECK-GLOBAL: @_ZTIN5test21AE = linkonce_odr constant // CHECK-GLOBAL: @_ZN5test22tiE = hidden constant } @@ -76,7 +76,7 @@ namespace test3 { const std::type_info &ti = typeid(B); // CHECK-GLOBAL: @_ZTSN5test31BINS_1AEEE = linkonce_odr constant - // CHECK-GLOBAL: @_ZTIN5test31BINS_1AEEE = linkonce_odr unnamed_addr constant + // CHECK-GLOBAL: @_ZTIN5test31BINS_1AEEE = linkonce_odr constant } namespace test4 { @@ -92,7 +92,7 @@ namespace test4 { const std::type_info &ti = typeid(B); // CHECK-GLOBAL: @_ZTSN5test41BINS_1AEEE = linkonce_odr constant - // CHECK-GLOBAL: @_ZTIN5test41BINS_1AEEE = linkonce_odr unnamed_addr constant + // CHECK-GLOBAL: @_ZTIN5test41BINS_1AEEE = linkonce_odr constant } namespace test5 { @@ -108,5 +108,5 @@ namespace test5 { const std::type_info &ti = typeid(B); // CHECK-GLOBAL: @_ZTSN5test51BINS_1AEEE = linkonce_odr hidden constant - // CHECK-GLOBAL: @_ZTIN5test51BINS_1AEEE = linkonce_odr hidden unnamed_addr constant + // CHECK-GLOBAL: @_ZTIN5test51BINS_1AEEE = linkonce_odr hidden constant } diff --git a/test/CodeGenCXX/vtable-available-externally.cpp b/test/CodeGenCXX/vtable-available-externally.cpp index 282bd2a172..e07d48463f 100644 --- a/test/CodeGenCXX/vtable-available-externally.cpp +++ b/test/CodeGenCXX/vtable-available-externally.cpp @@ -35,7 +35,7 @@ void g() { // updated correctly. // CHECK-TEST2: @_ZTSN5Test21AE = constant -// CHECK-TEST2: @_ZTIN5Test21AE = unnamed_addr constant +// CHECK-TEST2: @_ZTIN5Test21AE = constant // CHECK-TEST2: @_ZTVN5Test21AE = unnamed_addr constant namespace Test2 { struct A { diff --git a/test/CodeGenCXX/vtable-key-function-arm.cpp b/test/CodeGenCXX/vtable-key-function-arm.cpp index 6f10bc3cdd..6f1265b627 100644 --- a/test/CodeGenCXX/vtable-key-function-arm.cpp +++ b/test/CodeGenCXX/vtable-key-function-arm.cpp @@ -91,7 +91,7 @@ struct Test2a { Test2a::Test2a() { use(typeid(Test2a)); } // CHECK: @_ZTV6Test2a = unnamed_addr constant // CHECK-LATE: @_ZTS6Test2a = constant -// CHECK-LATE: @_ZTI6Test2a = unnamed_addr constant +// CHECK-LATE: @_ZTI6Test2a = constant // 'bar' becomes the key function when 'foo' is defined inline. void Test2a::bar() {} @@ -112,7 +112,7 @@ void Test2b::bar() {} Test2b::Test2b() { use(typeid(Test2b)); } // CHECK: @_ZTV6Test2b = unnamed_addr constant // CHECK-LATE: @_ZTS6Test2b = constant -// CHECK-LATE: @_ZTI6Test2b = unnamed_addr constant +// CHECK-LATE: @_ZTI6Test2b = constant inline void Test2b::foo() {} @@ -132,7 +132,7 @@ inline void Test2c::foo() {} Test2c::Test2c() { use(typeid(Test2c)); } // CHECK: @_ZTV6Test2c = unnamed_addr constant // CHECK: @_ZTS6Test2c = constant -// CHECK: @_ZTI6Test2c = unnamed_addr constant +// CHECK: @_ZTI6Test2c = constant /*** Test3a ******************************************************************/ @@ -146,7 +146,7 @@ struct Test3a { Test3a::Test3a() { use(typeid(Test3a)); } // CHECK: @_ZTV6Test3a = linkonce_odr unnamed_addr constant // CHECK-LATE: @_ZTS6Test3a = linkonce_odr constant -// CHECK-LATE: @_ZTI6Test3a = linkonce_odr unnamed_addr constant +// CHECK-LATE: @_ZTI6Test3a = linkonce_odr constant // There ceases to be a key function after these declarations. inline void Test3a::bar() {} @@ -167,7 +167,7 @@ inline void Test3b::bar() {} Test3b::Test3b() { use(typeid(Test3b)); } // CHECK: @_ZTV6Test3b = linkonce_odr unnamed_addr constant // CHECK-LATE: @_ZTS6Test3b = linkonce_odr constant -// CHECK-LATE: @_ZTI6Test3b = linkonce_odr unnamed_addr constant +// CHECK-LATE: @_ZTI6Test3b = linkonce_odr constant inline void Test3b::foo() {} @@ -187,7 +187,7 @@ inline void Test3c::foo() {} Test3c::Test3c() { use(typeid(Test3c)); } // CHECK: @_ZTV6Test3c = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test3c = linkonce_odr constant -// CHECK: @_ZTI6Test3c = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test3c = linkonce_odr constant /*** Test4a ******************************************************************/ @@ -201,7 +201,7 @@ template struct Test4a { template <> Test4a::Test4a() { use(typeid(Test4a)); } // CHECK: @_ZTV6Test4aIiE = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test4aIiE = linkonce_odr constant -// CHECK: @_ZTI6Test4aIiE = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test4aIiE = linkonce_odr constant // There ceases to be a key function after these declarations. template <> inline void Test4a::bar() {} @@ -222,7 +222,7 @@ template <> inline void Test4b::bar() {} template <> Test4b::Test4b() { use(typeid(Test4b)); } // CHECK: @_ZTV6Test4bIiE = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test4bIiE = linkonce_odr constant -// CHECK: @_ZTI6Test4bIiE = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test4bIiE = linkonce_odr constant template <> inline void Test4b::foo() {} @@ -242,7 +242,7 @@ template <> inline void Test4c::foo() {} template <> Test4c::Test4c() { use(typeid(Test4c)); } // CHECK: @_ZTV6Test4cIiE = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test4cIiE = linkonce_odr constant -// CHECK: @_ZTI6Test4cIiE = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test4cIiE = linkonce_odr constant /*** Test5a ******************************************************************/ @@ -259,7 +259,7 @@ template <> inline void Test5a::foo(); template <> Test5a::Test5a() { use(typeid(Test5a)); } // CHECK: @_ZTV6Test5aIiE = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test5aIiE = linkonce_odr constant -// CHECK: @_ZTI6Test5aIiE = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test5aIiE = linkonce_odr constant // There ceases to be a key function after these declarations. template <> inline void Test5a::bar() {} @@ -281,7 +281,7 @@ template <> inline void Test5b::bar() {} template <> Test5b::Test5b() { use(typeid(Test5b)); } // CHECK: @_ZTV6Test5bIiE = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test5bIiE = linkonce_odr constant -// CHECK: @_ZTI6Test5bIiE = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test5bIiE = linkonce_odr constant template <> inline void Test5a::foo(); template <> inline void Test5b::foo() {} @@ -304,4 +304,4 @@ template <> inline void Test5c::foo() {} template <> Test5c::Test5c() { use(typeid(Test5c)); } // CHECK: @_ZTV6Test5cIiE = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test5cIiE = linkonce_odr constant -// CHECK: @_ZTI6Test5cIiE = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test5cIiE = linkonce_odr constant diff --git a/test/CodeGenCXX/vtable-key-function-ios.cpp b/test/CodeGenCXX/vtable-key-function-ios.cpp index c312bccd5a..bf2e1f9720 100644 --- a/test/CodeGenCXX/vtable-key-function-ios.cpp +++ b/test/CodeGenCXX/vtable-key-function-ios.cpp @@ -59,7 +59,7 @@ struct Test1a { Test1a::Test1a() { use(typeid(Test1a)); } // CHECK: @_ZTV6Test1a = linkonce_odr unnamed_addr constant // CHECK-LATE: @_ZTS6Test1a = linkonce_odr constant -// CHECK-LATE: @_ZTI6Test1a = linkonce_odr unnamed_addr constant +// CHECK-LATE: @_ZTI6Test1a = linkonce_odr constant // This defines the key function. inline void Test1a::foo() {} @@ -79,7 +79,7 @@ inline void Test1b::foo() {} Test1b::Test1b() { use(typeid(Test1b)); } // CHECK: @_ZTV6Test1b = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test1b = linkonce_odr constant -// CHECK: @_ZTI6Test1b = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test1b = linkonce_odr constant /*** Test2a ******************************************************************/ @@ -93,7 +93,7 @@ struct Test2a { Test2a::Test2a() { use(typeid(Test2a)); } // CHECK: @_ZTV6Test2a = linkonce_odr unnamed_addr constant // CHECK-LATE: @_ZTS6Test2a = linkonce_odr constant -// CHECK-LATE: @_ZTI6Test2a = linkonce_odr unnamed_addr constant +// CHECK-LATE: @_ZTI6Test2a = linkonce_odr constant void Test2a::bar() {} inline void Test2a::foo() {} @@ -112,7 +112,7 @@ void Test2b::bar() {} Test2b::Test2b() { use(typeid(Test2b)); } // CHECK: @_ZTV6Test2b = linkonce_odr unnamed_addr constant // CHECK-LATE: @_ZTS6Test2b = linkonce_odr constant -// CHECK-LATE: @_ZTI6Test2b = linkonce_odr unnamed_addr constant +// CHECK-LATE: @_ZTI6Test2b = linkonce_odr constant inline void Test2b::foo() {} @@ -131,7 +131,7 @@ inline void Test2c::foo() {} Test2c::Test2c() { use(typeid(Test2c)); } // CHECK: @_ZTV6Test2c = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test2c = linkonce_odr constant -// CHECK: @_ZTI6Test2c = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test2c = linkonce_odr constant /*** Test3a ******************************************************************/ @@ -145,7 +145,7 @@ struct Test3a { Test3a::Test3a() { use(typeid(Test3a)); } // CHECK: @_ZTV6Test3a = linkonce_odr unnamed_addr constant // CHECK-LATE: @_ZTS6Test3a = linkonce_odr constant -// CHECK-LATE: @_ZTI6Test3a = linkonce_odr unnamed_addr constant +// CHECK-LATE: @_ZTI6Test3a = linkonce_odr constant // This defines the key function. inline void Test3a::bar() {} @@ -165,7 +165,7 @@ inline void Test3b::bar() {} Test3b::Test3b() { use(typeid(Test3b)); } // CHECK: @_ZTV6Test3b = linkonce_odr unnamed_addr constant // CHECK-LATE: @_ZTS6Test3b = linkonce_odr constant -// CHECK-LATE: @_ZTI6Test3b = linkonce_odr unnamed_addr constant +// CHECK-LATE: @_ZTI6Test3b = linkonce_odr constant // This defines the key function. inline void Test3b::foo() {} @@ -186,4 +186,4 @@ inline void Test3c::foo() {} Test3c::Test3c() { use(typeid(Test3c)); } // CHECK: @_ZTV6Test3c = linkonce_odr unnamed_addr constant // CHECK: @_ZTS6Test3c = linkonce_odr constant -// CHECK: @_ZTI6Test3c = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI6Test3c = linkonce_odr constant diff --git a/test/CodeGenCXX/vtable-linkage.cpp b/test/CodeGenCXX/vtable-linkage.cpp index dc2ce261ad..9c08b3037c 100644 --- a/test/CodeGenCXX/vtable-linkage.cpp +++ b/test/CodeGenCXX/vtable-linkage.cpp @@ -91,47 +91,47 @@ void use_F() { // 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 unnamed_addr constant +// CHECK-DAG: @_ZTI1C = linkonce_odr constant // CHECK-DAG: @_ZTT1C = linkonce_odr unnamed_addr constant // D has a key function that is defined in this translation unit so its vtable is // defined in the translation unit. // CHECK-DAG: @_ZTV1D = unnamed_addr constant // CHECK-DAG: @_ZTS1D = constant -// CHECK-DAG: @_ZTI1D = unnamed_addr constant +// CHECK-DAG: @_ZTI1D = constant // E is an explicit specialization with a key function defined // in this translation unit, so its vtable should have external // linkage. // CHECK-DAG: @_ZTV1EIcE = unnamed_addr constant // CHECK-DAG: @_ZTS1EIcE = constant -// CHECK-DAG: @_ZTI1EIcE = unnamed_addr constant +// CHECK-DAG: @_ZTI1EIcE = constant // E 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 unnamed_addr constant +// CHECK-DAG: @_ZTI1EIsE = weak_odr constant // F 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 unnamed_addr constant +// CHECK-DAG: @_ZTI1FIsE = weak_odr constant // E 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 unnamed_addr constant +// CHECK-DAG: @_ZTI1EIlE = linkonce_odr constant // F 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 unnamed_addr constant +// CHECK-DAG: @_ZTI1FIlE = linkonce_odr constant // F is an explicit template instantiation declaration without a // key function, so its vtable should have external linkage. @@ -148,19 +148,19 @@ void use_F() { // internal linkage. // CHECK-DAG: @"_ZTV3$_0" = internal unnamed_addr constant // CHECK-DAG: @"_ZTS3$_0" = internal constant -// CHECK-DAG: @"_ZTI3$_0" = internal unnamed_addr constant +// CHECK-DAG: @"_ZTI3$_0" = internal constant // The A vtable should have internal linkage since it is inside an anonymous // namespace. // CHECK-DAG: @_ZTVN12_GLOBAL__N_11AE = internal unnamed_addr constant // CHECK-DAG: @_ZTSN12_GLOBAL__N_11AE = internal constant -// CHECK-DAG: @_ZTIN12_GLOBAL__N_11AE = internal unnamed_addr constant +// CHECK-DAG: @_ZTIN12_GLOBAL__N_11AE = internal constant // F 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 unnamed_addr constant +// CHECK-DAG: @_ZTI1FIcE = linkonce_odr constant // CHECK-DAG: @_ZTV1GIiE = linkonce_odr unnamed_addr constant template diff --git a/test/CodeGenCXX/weak-extern-typeinfo.cpp b/test/CodeGenCXX/weak-extern-typeinfo.cpp index 68198eeb06..38f6a3e462 100644 --- a/test/CodeGenCXX/weak-extern-typeinfo.cpp +++ b/test/CodeGenCXX/weak-extern-typeinfo.cpp @@ -32,16 +32,16 @@ void V1::foo() { } void V2::foo() { } // CHECK: @_ZTS1A = weak_odr constant -// CHECK: @_ZTI1A = weak_odr unnamed_addr constant +// CHECK: @_ZTI1A = weak_odr constant // CHECK: @_ZTS1B = weak_odr constant -// CHECK: @_ZTI1B = weak_odr unnamed_addr constant +// CHECK: @_ZTI1B = weak_odr constant // CHECK: @_ZTS1C = weak_odr constant // CHECK: @_ZTS2T1 = linkonce_odr constant -// CHECK: @_ZTI2T1 = linkonce_odr unnamed_addr constant +// CHECK: @_ZTI2T1 = linkonce_odr constant // CHECK: @_ZTS1T = linkonce_odr constant -// CHECK: @_ZTI1T = linkonce_odr unnamed_addr constant -// CHECK: @_ZTI1C = weak_odr unnamed_addr constant +// CHECK: @_ZTI1T = linkonce_odr constant +// CHECK: @_ZTI1C = weak_odr constant // CHECK: @_ZTS2V1 = weak_odr constant -// CHECK: @_ZTI2V1 = weak_odr unnamed_addr constant +// CHECK: @_ZTI2V1 = weak_odr constant // CHECK: @_ZTS2V2 = weak_odr constant -// CHECK: @_ZTI2V2 = weak_odr unnamed_addr constant +// CHECK: @_ZTI2V2 = weak_odr constant diff --git a/test/CodeGenObjCXX/rtti.mm b/test/CodeGenObjCXX/rtti.mm index e458f090a7..326760fa6f 100644 --- a/test/CodeGenObjCXX/rtti.mm +++ b/test/CodeGenObjCXX/rtti.mm @@ -4,19 +4,19 @@ namespace std { class type_info; } -// CHECK: @_ZTI1A = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS1A +// CHECK: @_ZTI1A = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS1A @interface A @end -// CHECK: @_ZTI1B = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv120__si_class_type_infoE{{.*}}@_ZTS1B{{.*}}@_ZTI1A +// CHECK: @_ZTI1B = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv120__si_class_type_infoE{{.*}}@_ZTS1B{{.*}}@_ZTI1A @interface B : A @end -// CHECK: @_ZTIP1B = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP1B{{.*}}), i32 0, {{.*}}@_ZTI1B -// CHECK: @_ZTI11objc_object = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS11objc_object -// CHECK: @_ZTIP11objc_object = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP11objc_object{{.*}}@_ZTI11objc_object -// CHECK: @_ZTI10objc_class = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS10objc_class -// CHECK: @_ZTIP10objc_class = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP10objc_class{{.*}}@_ZTI10objc_class +// CHECK: @_ZTIP1B = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP1B{{.*}}), i32 0, {{.*}}@_ZTI1B +// CHECK: @_ZTI11objc_object = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS11objc_object +// CHECK: @_ZTIP11objc_object = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP11objc_object{{.*}}@_ZTI11objc_object +// CHECK: @_ZTI10objc_class = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS10objc_class +// CHECK: @_ZTIP10objc_class = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP10objc_class{{.*}}@_ZTI10objc_class @protocol P; diff --git a/test/SemaCXX/typeid-ref.cpp b/test/SemaCXX/typeid-ref.cpp index d77993c803..7e5dbdd85a 100644 --- a/test/SemaCXX/typeid-ref.cpp +++ b/test/SemaCXX/typeid-ref.cpp @@ -7,6 +7,6 @@ struct X { }; void f() { // CHECK: @_ZTS1X = linkonce_odr constant - // CHECK: @_ZTI1X = linkonce_odr unnamed_addr constant + // CHECK: @_ZTI1X = linkonce_odr constant (void)typeid(X&); } -- 2.40.0