2016-12-23 08:23:01 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-pc-win32 -fms-extensions -emit-llvm -O1 -disable-llvm-passes %s -o - | FileCheck %s
|
2016-02-12 01:49:28 +08:00
|
|
|
|
2016-09-14 06:51:42 +08:00
|
|
|
class __declspec(dllimport) A {
|
2016-02-12 01:49:28 +08:00
|
|
|
virtual void m_fn1();
|
|
|
|
};
|
|
|
|
template <typename>
|
2016-02-23 01:22:08 +08:00
|
|
|
class B : virtual A {};
|
2016-02-12 01:49:28 +08:00
|
|
|
|
|
|
|
extern template class __declspec(dllimport) B<int>;
|
|
|
|
class __declspec(dllexport) C : B<int> {};
|
|
|
|
|
2018-03-17 04:36:49 +08:00
|
|
|
// CHECK-DAG: @[[VTABLE_C:.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (%rtti.CompleteObjectLocator* @"??_R4C@@6B@" to i8*), i8* bitcast (void (%class.A*)* @"?m_fn1@A@@EAEXXZ" to i8*)] }
|
|
|
|
// CHECK-DAG: @[[VTABLE_B:.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (%rtti.CompleteObjectLocator* @"??_R4?$B@H@@6B@" to i8*), i8* bitcast (void (%class.A*)* @"?m_fn1@A@@EAEXXZ" to i8*)] }, comdat($"??_S?$B@H@@6B@")
|
|
|
|
// CHECK-DAG: @[[VTABLE_A:.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (%rtti.CompleteObjectLocator* @"??_R4A@@6B@" to i8*), i8* bitcast (void (%class.A*)* @"?m_fn1@A@@EAEXXZ" to i8*)] }, comdat($"??_SA@@6B@")
|
2016-02-23 01:22:08 +08:00
|
|
|
|
2018-03-17 04:36:49 +08:00
|
|
|
// CHECK-DAG: @"??_7C@@6B@" = dllexport unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @[[VTABLE_C]], i32 0, i32 0, i32 1)
|
|
|
|
// CHECK-DAG: @"??_S?$B@H@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @[[VTABLE_B]], i32 0, i32 0, i32 1)
|
|
|
|
// CHECK-DAG: @"??_SA@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @[[VTABLE_A]], i32 0, i32 0, i32 1)
|
2016-02-23 01:22:08 +08:00
|
|
|
|
2018-03-17 04:36:49 +08:00
|
|
|
// CHECK-DAG: @"??_8?$B@H@@7B@" = available_externally dllimport unnamed_addr constant [2 x i32] [i32 0, i32 4]
|