blob: 451d3fb2704d590457fbf5de8ae26c83c124af4b [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
Anders Carlsson4e713562009-12-11 16:37:06 +00002
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() { }