1; REQUIRES: object-emission 2; RUN: %llc_dwarf -accel-tables=Dwarf -filetype=obj -o %t < %s 3; RUN: llvm-dwarfdump -debug-names %t | FileCheck %s 4; RUN: llvm-dwarfdump -debug-names -verify %t | FileCheck --check-prefix=VERIFY %s 5 6; Check the header 7; CHECK: CU count: 1 8; CHECK: Local TU count: 0 9; CHECK: Foreign TU count: 0 10; CHECK: Name count: 1 11; CHECK: CU[0]: 0x{{[0-9a-f]*}} 12 13; CHECK: Abbreviation [[ABBREV:0x[0-9a-f]*]] 14; CHECK-NEXT: Tag: DW_TAG_variable 15; CHECK-NEXT: DW_IDX_die_offset: DW_FORM_ref4 16 17; CHECK: String: 0x{{[0-9a-f]*}} "foobar" 18; CHECK-NEXT: Entry 19; CHECK-NEXT: Abbrev: [[ABBREV]] 20; CHECK-NEXT: Tag: DW_TAG_variable 21; CHECK-NEXT: DW_IDX_die_offset: 0x{{[0-9a-f]*}} 22 23; VERIFY: No errors. 24 25@foobar = common dso_local global i8* null, align 8, !dbg !0 26 27!llvm.dbg.cu = !{!2} 28!llvm.module.flags = !{!7, !8, !9} 29!llvm.ident = !{!10} 30 31!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) 32!1 = distinct !DIGlobalVariable(name: "foobar", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true) 33!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 7.0.0 (trunk 325496) (llvm/trunk 325732)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5) 34!3 = !DIFile(filename: "/tmp/cu1.c", directory: "/tmp") 35!4 = !{} 36!5 = !{!0} 37!6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) 38!7 = !{i32 2, !"Dwarf Version", i32 4} 39!8 = !{i32 2, !"Debug Info Version", i32 3} 40!9 = !{i32 1, !"wchar_size", i32 4} 41!10 = !{!"clang version 7.0.0 (trunk 325496) (llvm/trunk 325732)"} 42