1 // RUN: %clang_cc1 %s -triple=i686-pc-windows-msvc -debug-info-kind=limited -gcodeview -emit-llvm -o - | FileCheck %s 2 3 // Tests that certain miscellaneous features work in the MS ABI. 4 5 struct Foo { 6 virtual void f(); 7 virtual void g(); 8 virtual void h(); 9 struct Nested {}; 10 }; 11 Foo f; 12 Foo::Nested n; 13 14 // CHECK: ![[Nested:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Nested", 15 // CHECK-SAME: identifier: ".?AUNested@Foo@@" 16 17 // CHECK: ![[Foo:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", 18 // CHECK-SAME: elements: ![[elements:[0-9]+]] 19 // CHECK-SAME: identifier: ".?AUFoo@@" 20 21 // CHECK: ![[elements]] = !{![[vshape:[0-9]+]], ![[vptr:[0-9]+]], ![[Nested]], ![[f:[0-9]+]], ![[g:[0-9]+]], ![[h:[0-9]+]]} 22 23 // CHECK: ![[vshape]] = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", baseType: null, size: 96) 24 25 // CHECK: ![[vptr]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$Foo", 26 // CHECK-SAME: baseType: ![[vptr_ty:[0-9]+]], 27 28 // CHECK: ![[vptr_ty]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[vshape]], size: 32 29 30 // CHECK: ![[f]] = !DISubprogram(name: "f", 31 // CHECK-SAME: containingType: ![[Foo]], virtuality: DW_VIRTUALITY_virtual, virtualIndex: 0, 32 // CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual, 33 34 // CHECK: ![[g]] = !DISubprogram(name: "g", 35 // CHECK-SAME: containingType: ![[Foo]], virtuality: DW_VIRTUALITY_virtual, virtualIndex: 1, 36 // CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual, 37 38 // CHECK: ![[h]] = !DISubprogram(name: "h", 39 // CHECK-SAME: containingType: ![[Foo]], virtuality: DW_VIRTUALITY_virtual, virtualIndex: 2, 40 // CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual, 41