aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/rtti-linkage.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-12-15 18:49:47 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-12-15 18:49:47 +0000
commit34d02d0b37f16015f317a935c48ce8b7b64ae77b (patch)
tree2fd5819f49caecc5f520219b6b9254fe94ebb138 /test/CodeGenCXX/rtti-linkage.cpp
parent1569ce68681d909594d64f9b056d71f5dd7563bf (diff)
downloadsrc-34d02d0b37f16015f317a935c48ce8b7b64ae77b.tar.gz
src-34d02d0b37f16015f317a935c48ce8b7b64ae77b.zip
Update clang to 91430.
Notes
Notes: svn path=/vendor/clang/dist/; revision=200583
Diffstat (limited to 'test/CodeGenCXX/rtti-linkage.cpp')
-rw-r--r--test/CodeGenCXX/rtti-linkage.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGenCXX/rtti-linkage.cpp b/test/CodeGenCXX/rtti-linkage.cpp
new file mode 100644
index 000000000000..a2a1cdd48c10
--- /dev/null
+++ b/test/CodeGenCXX/rtti-linkage.cpp
@@ -0,0 +1,16 @@
+// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+
+// CHECK: _ZTS1B = constant
+// CHECK: _ZTS1A = weak_odr constant
+// CHECK: _ZTI1A = weak_odr constant
+// CHECK: _ZTI1B = constant
+
+// A has no key function, so its RTTI data should be weak_odr.
+struct A { };
+
+// B has a key function defined in the translation unit, so the RTTI data should
+// be emitted in this translation unit and have external linkage.
+struct B : A {
+ virtual void f();
+};
+void B::f() { }