Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s |
Anders Carlsson | 4e71356 | 2009-12-11 16:37:06 +0000 | [diff] [blame] | 2 | |
| 3 | // CHECK: _ZTS1B = constant |
| 4 | // CHECK: _ZTS1A = weak_odr constant |
| 5 | // CHECK: _ZTI1A = weak_odr constant |
| 6 | // CHECK: _ZTI1B = constant |
| 7 | |
| 8 | // A has no key function, so its RTTI data should be weak_odr. |
| 9 | struct A { }; |
| 10 | |
| 11 | // B has a key function defined in the translation unit, so the RTTI data should |
| 12 | // be emitted in this translation unit and have external linkage. |
| 13 | struct B : A { |
| 14 | virtual void f(); |
| 15 | }; |
| 16 | void B::f() { } |