r201020 - type_info objects are not unnamed_addr: the ABI requires us to
John McCall
rjmccall at apple.com
Fri Feb 7 19:26:06 PST 2014
Author: rjmccall
Date: Fri Feb 7 21:26:05 2014
New Revision: 201020
URL: http://llvm.org/viewvc/llvm-project?rev=201020&view=rev
Log:
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
Modified:
cfe/trunk/lib/CodeGen/CGRTTI.cpp
cfe/trunk/test/CodeGenCXX/exceptions-no-rtti.cpp
cfe/trunk/test/CodeGenCXX/rtti-fundamental.cpp
cfe/trunk/test/CodeGenCXX/rtti-linkage.cpp
cfe/trunk/test/CodeGenCXX/rtti-visibility.cpp
cfe/trunk/test/CodeGenCXX/type_visibility.cpp
cfe/trunk/test/CodeGenCXX/virt-dtor-key.cpp
cfe/trunk/test/CodeGenCXX/visibility-ms-compat.cpp
cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp
cfe/trunk/test/CodeGenCXX/vtable-key-function-arm.cpp
cfe/trunk/test/CodeGenCXX/vtable-key-function-ios.cpp
cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp
cfe/trunk/test/CodeGenCXX/weak-extern-typeinfo.cpp
cfe/trunk/test/CodeGenObjCXX/rtti.mm
cfe/trunk/test/SemaCXX/typeid-ref.cpp
Modified: cfe/trunk/lib/CodeGen/CGRTTI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRTTI.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRTTI.cpp Fri Feb 7 21:26:05 2014
@@ -644,6 +644,21 @@ llvm::Constant *RTTIBuilder::BuildTypeIn
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::BuildTypeIn
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);
}
Modified: cfe/trunk/test/CodeGenCXX/exceptions-no-rtti.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/exceptions-no-rtti.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/exceptions-no-rtti.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/exceptions-no-rtti.cpp Fri Feb 7 21:26:05 2014
@@ -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 {
Modified: cfe/trunk/test/CodeGenCXX/rtti-fundamental.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/rtti-fundamental.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/rtti-fundamental.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/rtti-fundamental.cpp Fri Feb 7 21:26:05 2014
@@ -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
Modified: cfe/trunk/test/CodeGenCXX/rtti-linkage.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/rtti-linkage.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/rtti-linkage.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/rtti-linkage.cpp Fri Feb 7 21:26:05 2014
@@ -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
Modified: cfe/trunk/test/CodeGenCXX/rtti-visibility.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/rtti-visibility.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/rtti-visibility.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/rtti-visibility.cpp Fri Feb 7 21:26:05 2014
@@ -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);
Modified: cfe/trunk/test/CodeGenCXX/type_visibility.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/type_visibility.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/type_visibility.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/type_visibility.cpp Fri Feb 7 21:26:05 2014
@@ -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
}
Modified: cfe/trunk/test/CodeGenCXX/virt-dtor-key.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/virt-dtor-key.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/virt-dtor-key.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/virt-dtor-key.cpp Fri Feb 7 21:26:05 2014
@@ -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();
Modified: cfe/trunk/test/CodeGenCXX/visibility-ms-compat.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/visibility-ms-compat.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/visibility-ms-compat.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/visibility-ms-compat.cpp Fri Feb 7 21:26:05 2014
@@ -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<A>);
// 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<A>);
// 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<A>);
// 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
}
Modified: cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/vtable-available-externally.cpp Fri Feb 7 21:26:05 2014
@@ -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 {
Modified: cfe/trunk/test/CodeGenCXX/vtable-key-function-arm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-key-function-arm.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/vtable-key-function-arm.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/vtable-key-function-arm.cpp Fri Feb 7 21:26:05 2014
@@ -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 <class T> struct Test4a {
template <> Test4a<int>::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<int>::bar() {}
@@ -222,7 +222,7 @@ template <> inline void Test4b<int>::bar
template <> Test4b<int>::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<int>::foo() {}
@@ -242,7 +242,7 @@ template <> inline void Test4c<int>::foo
template <> Test4c<int>::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<int>::foo
template <> Test5a<int>::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<int>::bar() {}
@@ -281,7 +281,7 @@ template <> inline void Test5b<int>::bar
template <> Test5b<int>::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<int>::foo();
template <> inline void Test5b<int>::foo() {}
@@ -304,4 +304,4 @@ template <> inline void Test5c<int>::foo
template <> Test5c<int>::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
Modified: cfe/trunk/test/CodeGenCXX/vtable-key-function-ios.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-key-function-ios.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/vtable-key-function-ios.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/vtable-key-function-ios.cpp Fri Feb 7 21:26:05 2014
@@ -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
Modified: cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/vtable-linkage.cpp Fri Feb 7 21:26:05 2014
@@ -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<char> 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<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 unnamed_addr constant
+// CHECK-DAG: @_ZTI1EIsE = weak_odr constant
// 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 unnamed_addr constant
+// CHECK-DAG: @_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
// 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<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 unnamed_addr constant
+// CHECK-DAG: @_ZTI1FIlE = linkonce_odr constant
// F<int> 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<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 unnamed_addr constant
+// CHECK-DAG: @_ZTI1FIcE = linkonce_odr constant
// CHECK-DAG: @_ZTV1GIiE = linkonce_odr unnamed_addr constant
template <typename T>
Modified: cfe/trunk/test/CodeGenCXX/weak-extern-typeinfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/weak-extern-typeinfo.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/weak-extern-typeinfo.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/weak-extern-typeinfo.cpp Fri Feb 7 21:26:05 2014
@@ -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
Modified: cfe/trunk/test/CodeGenObjCXX/rtti.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/rtti.mm?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/rtti.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/rtti.mm Fri Feb 7 21:26:05 2014
@@ -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;
Modified: cfe/trunk/test/SemaCXX/typeid-ref.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/typeid-ref.cpp?rev=201020&r1=201019&r2=201020&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/typeid-ref.cpp (original)
+++ cfe/trunk/test/SemaCXX/typeid-ref.cpp Fri Feb 7 21:26:05 2014
@@ -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&);
}
More information about the cfe-commits
mailing list