2016-07-22 02:43:20 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple=i686-pc-windows-msvc -debug-info-kind=limited -gcodeview -emit-llvm -o - | FileCheck %s
|
2016-06-16 09:21:28 +08:00
|
|
|
|
|
|
|
// Tests that certain miscellaneous features work in the MS ABI.
|
|
|
|
|
|
|
|
struct Foo {
|
2016-06-17 04:08:51 +08:00
|
|
|
virtual void f();
|
|
|
|
virtual void g();
|
|
|
|
virtual void h();
|
2017-09-14 04:53:55 +08:00
|
|
|
static void i(int, int);
|
2016-06-16 09:21:28 +08:00
|
|
|
struct Nested {};
|
|
|
|
};
|
|
|
|
Foo f;
|
|
|
|
Foo::Nested n;
|
2016-06-23 02:34:45 +08:00
|
|
|
|
2016-09-13 09:13:19 +08:00
|
|
|
// CHECK: ![[Nested:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Nested",
|
|
|
|
// CHECK-SAME: identifier: ".?AUNested@Foo@@"
|
|
|
|
|
2016-06-17 04:08:51 +08:00
|
|
|
// CHECK: ![[Foo:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo",
|
2016-07-22 02:43:20 +08:00
|
|
|
// CHECK-SAME: elements: ![[elements:[0-9]+]]
|
2016-06-16 09:21:28 +08:00
|
|
|
// CHECK-SAME: identifier: ".?AUFoo@@"
|
2016-06-23 02:34:45 +08:00
|
|
|
|
2017-09-14 04:53:55 +08:00
|
|
|
// CHECK: ![[elements]] = !{![[vshape:[0-9]+]], ![[vptr:[0-9]+]], ![[Nested]], ![[f:[0-9]+]], ![[g:[0-9]+]], ![[h:[0-9]+]], ![[i:[0-9]+]]}
|
2016-09-01 00:11:43 +08:00
|
|
|
|
|
|
|
// CHECK: ![[vshape]] = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", baseType: null, size: 96)
|
|
|
|
|
|
|
|
// CHECK: ![[vptr]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$Foo",
|
|
|
|
// CHECK-SAME: baseType: ![[vptr_ty:[0-9]+]],
|
|
|
|
|
|
|
|
// CHECK: ![[vptr_ty]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[vshape]], size: 32
|
2016-07-22 02:43:20 +08:00
|
|
|
|
|
|
|
// CHECK: ![[f]] = !DISubprogram(name: "f",
|
2016-06-23 02:34:45 +08:00
|
|
|
// CHECK-SAME: containingType: ![[Foo]], virtuality: DW_VIRTUALITY_virtual, virtualIndex: 0,
|
|
|
|
// CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual,
|
|
|
|
|
2016-07-22 02:43:20 +08:00
|
|
|
// CHECK: ![[g]] = !DISubprogram(name: "g",
|
2016-06-23 02:34:45 +08:00
|
|
|
// CHECK-SAME: containingType: ![[Foo]], virtuality: DW_VIRTUALITY_virtual, virtualIndex: 1,
|
|
|
|
// CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual,
|
|
|
|
|
2016-07-22 02:43:20 +08:00
|
|
|
// CHECK: ![[h]] = !DISubprogram(name: "h",
|
2016-06-23 02:34:45 +08:00
|
|
|
// CHECK-SAME: containingType: ![[Foo]], virtuality: DW_VIRTUALITY_virtual, virtualIndex: 2,
|
|
|
|
// CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual,
|
2017-09-14 04:53:55 +08:00
|
|
|
|
|
|
|
// CHECK: ![[i]] = !DISubprogram(name: "i",
|
|
|
|
// CHECK-SAME: flags: DIFlagPrototyped | DIFlagStaticMember
|
|
|
|
// CHECK-NEXT: ![[dummy:[0-9]+]] = !DISubroutineType(types: ![[Signature:[0-9]+]])
|
|
|
|
// CHECK: ![[Signature]] = !{null, ![[BasicInt:[0-9]+]], ![[BasicInt]]}
|
|
|
|
// CHECK: ![[BasicInt]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|