summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-12-11 19:21:27 +0000
committerReid Kleckner <reid@kleckner.net>2013-12-11 19:21:27 +0000
commita12cd28bb3e23521ec623082c52c6c82e0a55bab (patch)
tree29d8a009846b24e4692f09cded4c001d153cd2a2 /clang/test
parent6d03fdb6a45daec2a661b217433a588e282f2b48 (diff)
downloadbcm5719-llvm-a12cd28bb3e23521ec623082c52c6c82e0a55bab.tar.gz
bcm5719-llvm-a12cd28bb3e23521ec623082c52c6c82e0a55bab.zip
[ms-cxxabi] Fix linkage of dtor thunks for anonymous classes
We were mistakengly giving linkonce_odr linkage instead of internal linkage to the deleting and complete destructor thunks for classes in anonymous namespaces. Fixes PR17273. llvm-svn: 197060
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/microsoft-abi-structors.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-structors.cpp b/clang/test/CodeGenCXX/microsoft-abi-structors.cpp
index c2f1395f47d..71cc31d9aec 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-structors.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-structors.cpp
@@ -299,3 +299,18 @@ void call_nv_deleting_dtor(D *d) {
}
}
+
+// Dtor thunks for classes in anonymous namespaces should be internal, not
+// linkonce_odr.
+namespace {
+struct A {
+ virtual ~A() { }
+};
+}
+void *getA() {
+ return (void*)new A();
+}
+// CHECK: define internal x86_thiscallcc void @"\01??_GA@?A@@UAEPAXI@Z"
+// CHECK: (%"struct.<anonymous namespace>::A"* %this, i32 %should_call_delete)
+// CHECK: define internal x86_thiscallcc void @"\01??1A@?A@@UAE@XZ"
+// CHECK: (%"struct.<anonymous namespace>::A"* %this)
OpenPOWER on IntegriCloud