1 // RUN: %clang_cc1 %s -gcodeview -debug-info-kind=line-tables-only -S \ 2 // RUN: -emit-llvm -o - | FileCheck %s 3 // Checks that clang with "-gline-tables-only" with CodeView emits some debug 4 // info for variables and types when they appear in function scopes. 5 6 namespace NS { 7 struct C { 8 void m() {} 9 }; 10 void f() {} 11 } 12 13 NS::C c; 14 15 void test() { 16 // CHECK: !DISubprogram(name: "f", scope: ![[NS:[0-9]+]], 17 // CHECK-SAME: type: ![[F:[0-9]+]] 18 // CHECK: ![[NS]] = !DINamespace(name: "NS", scope: null) 19 // CHECK: ![[F]] = !DISubroutineType(types: ![[FTYPE:[0-9]+]]) 20 // CHECK: ![[FTYPE]] = !{null} 21 NS::f(); 22 23 // CHECK: ![[M:[0-9]+]] = distinct !DISubprogram(name: "m", scope: ![[C:[0-9]+]], 24 // CHECK-SAME: type: ![[MTYPE:[0-9]+]] 25 // CHECK: ![[C]] = !DICompositeType(tag: DW_TAG_structure_type, name: "C", 26 // CHECK-SAME: flags: DIFlagFwdDecl 27 // CHECK-NOT: identifier 28 // CHECK: ![[MTYPE]] = !DISubroutineType(types: !{{.*}}) 29 c.m(); 30 } 31