rtti-linkage.cpp revision a5728872c7702ddd09537c95bc3cbd20e1f2fb09
1// RUN: %clang_cc1 %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() { } 17