blob: 3dd1be7dc69cbe92cf2b10d59bd791f864e3b7a4 [file] [log] [blame]
Yaron Keren04da2382015-07-29 15:42:28 +00001// RUN: %clang_cc1 %s -triple=x86_64-pc-windows-gnu -emit-llvm -o - | FileCheck %s
2
3namespace std { class type_info; }
4extern void use(const std::type_info &rtti);
5
6struct Test1a {
7 Test1a();
8 virtual void foo();
9 virtual void bar();
10};
11
12// V-table needs to be defined weakly.
13Test1a::Test1a() { use(typeid(Test1a)); }
14// This defines the key function.
15inline void Test1a::foo() {}
16
17// CHECK: $_ZTV6Test1a = comdat any
18// CHECK: $_ZTS6Test1a = comdat any
19// CHECK: $_ZTI6Test1a = comdat any
20// CHECK-NOT: $_ZTS6Test1a.1 = comdat any
21// CHECK-NOT: $_ZTI6Test1a.1 = comdat any
22
23// CHECK: @_ZTV6Test1a = linkonce_odr unnamed_addr constant {{.*}} ({ i8*, i8* }* @_ZTI6Test1a to i8*)
24// CHECK: @_ZTS6Test1a = linkonce_odr constant
25// CHECK: @_ZTI6Test1a = linkonce_odr constant {{.*}} [8 x i8]* @_ZTS6Test1a