summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/rtti-mingw64.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-08-31 08:29:59 +0000
committerMartin Storsjo <martin@martin.st>2017-08-31 08:29:59 +0000
commitcd7d552e0405580ccb1700f2358e30fbd40cebfb (patch)
treeffb0ba30365fff6150c7ca23da0f9348520f7ebc /clang/test/CodeGenCXX/rtti-mingw64.cpp
parent865d01a3cf28f826d482d9e3604d90d9f49b2fc9 (diff)
downloadbcm5719-llvm-cd7d552e0405580ccb1700f2358e30fbd40cebfb.tar.gz
bcm5719-llvm-cd7d552e0405580ccb1700f2358e30fbd40cebfb.zip
[ItaniumCXXABI] Always use linkonce_odr linkage for RTTI data on MinGW
This fixes cases where dynamic classes produced RTTI data with external linkage, producing linker errors about duplicate symbols. This touches code close to what was changed in SVN r244266, but this change doesn't break the tests added in that revision. Differential revision: https://reviews.llvm.org/D37206 llvm-svn: 312224
Diffstat (limited to 'clang/test/CodeGenCXX/rtti-mingw64.cpp')
-rw-r--r--clang/test/CodeGenCXX/rtti-mingw64.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/rtti-mingw64.cpp b/clang/test/CodeGenCXX/rtti-mingw64.cpp
index 818b11b64bc..9f3e03961e8 100644
--- a/clang/test/CodeGenCXX/rtti-mingw64.cpp
+++ b/clang/test/CodeGenCXX/rtti-mingw64.cpp
@@ -2,7 +2,12 @@
struct A { int a; };
struct B : virtual A { int b; };
B b;
+class C {
+ virtual ~C();
+};
+C::~C() {}
+// CHECK: @_ZTI1C = linkonce_odr
// CHECK: @_ZTI1B = linkonce_odr constant { i8*, i8*, i32, i32, i8*, i64 }
// CHECK-SAME: i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2) to i8*),
// CHECK-SAME: i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1B, i32 0, i32 0),
OpenPOWER on IntegriCloud