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: ![[Foo:[^ ]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", 15 // CHECK-SAME: elements: ![[elements:[0-9]+]] 16 // CHECK-SAME: identifier: ".?AUFoo@@" 17 18 // CHECK: ![[elements]] = !{![[vptr:[0-9]+]], ![[Nested:[0-9]+]], ![[f:[0-9]+]], ![[g:[0-9]+]], ![[h:[0-9]+]]} 19 20 // CHECK: ![[Nested]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Nested", 21 // CHECK-SAME: identifier: ".?AUNested@Foo@@" 22 23 // CHECK: ![[f]] = !DISubprogram(name: "f", 24 // CHECK-SAME: containingType: ![[Foo]], virtuality: DW_VIRTUALITY_virtual, virtualIndex: 0, 25 // CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual, 26 27 // CHECK: ![[g]] = !DISubprogram(name: "g", 28 // CHECK-SAME: containingType: ![[Foo]], virtuality: DW_VIRTUALITY_virtual, virtualIndex: 1, 29 // CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual, 30 31 // CHECK: ![[h]] = !DISubprogram(name: "h", 32 // CHECK-SAME: containingType: ![[Foo]], virtuality: DW_VIRTUALITY_virtual, virtualIndex: 2, 33 // CHECK-SAME: flags: DIFlagPrototyped | DIFlagIntroducedVirtual, 34