blob: a2a1cdd48c1070efc28d2c2acea61d01605789e4 [file] [log] [blame]
Anders Carlsson4e713562009-12-11 16:37:06 +00001// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
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.
9struct 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.
13struct B : A {
14 virtual void f();
15};
16void B::f() { }