1; REQUIRES: x86-registered-target 2; RUN: %llc_dwarf -O1 -filetype=obj -split-dwarf-file=%t.dwo < %s | llvm-dwarfdump -debug-info - | FileCheck %s --implicit-check-not "{{DW_TAG|NULL}}" 3 4; CHECK-LABEL: debug_info contents 5; CHECK: DW_TAG_compile_unit 6; CHECK: DW_AT_GNU_dwo_name 7; CHECK: DW_AT_GNU_dwo_id 8; CHECK: DW_TAG_subprogram 9; CHECK: DW_TAG_subprogram 10; CHECK: DW_TAG_inlined_subroutine 11; CHECK: NULL 12; CHECK: NULL 13 14; CHECK-LABEL: debug_info.dwo contents 15 16; CHECK: DW_TAG_compile_unit 17; CHECK: DW_TAG_subprogram 18; CHECK: DW_TAG_imported_declaration 19; CHECK: NULL 20; CHECK: DW_TAG_subprogram 21; CHECK: DW_TAG_inlined_subroutine 22; CHECK: NULL 23; CHECK: DW_TAG_namespace 24; CHECK: DW_TAG_structure_type 25; CHECK: NULL 26; CHECK: DW_TAG_base_type 27; CHECK: NULL 28 29target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 30target triple = "x86_64-unknown-linux-gnu" 31 32%"struct.ns::t1" = type { i8 } 33 34declare void @llvm.dbg.declare(metadata, metadata, metadata) 35 36declare dso_local void @_Z3pinv() local_unnamed_addr 37 38define dso_local i32 @main() local_unnamed_addr !dbg !18 { 39entry: 40 call void @llvm.dbg.declare(metadata ptr undef, metadata !22, metadata !DIExpression()), !dbg !23 41 call void @_Z3pinv(), !dbg !25 42 ret i32 0, !dbg !26 43} 44 45!llvm.dbg.cu = !{!0, !10} 46!llvm.ident = !{!12, !12} 47!llvm.module.flags = !{!13, !14, !15, !16, !17} 48 49!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: true, nameTableKind: GNU) 50!1 = !DIFile(filename: "a.cpp", directory: "/") 51!2 = !{!3} 52!3 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !4, entity: !8, file: !1, line: 3) 53!4 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", scope: !1, file: !1, line: 3, type: !5, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) 54!5 = !DISubroutineType(types: !6) 55!6 = !{null} 56!7 = !{} 57!8 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t1", scope: !9, file: !1, line: 1, size: 8, flags: DIFlagTypePassByValue, elements: !7, identifier: "_ZTSN2ns2t1E") 58!9 = !DINamespace(name: "ns", scope: null) 59!10 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !11, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: true, nameTableKind: GNU) 60!11 = !DIFile(filename: "b.cpp", directory: "/") 61!12 = !{!"clang version 14.0.0"} 62!13 = !{i32 7, !"Dwarf Version", i32 4} 63!14 = !{i32 2, !"Debug Info Version", i32 3} 64!15 = !{i32 1, !"wchar_size", i32 4} 65!16 = !{i32 7, !"uwtable", i32 1} 66!17 = !{i32 7, !"frame-pointer", i32 2} 67!18 = distinct !DISubprogram(name: "main", scope: !11, file: !11, line: 2, type: !19, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !10, retainedNodes: !7) 68!19 = !DISubroutineType(types: !20) 69!20 = !{!21} 70!21 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 71!22 = !DILocalVariable(name: "v1", scope: !4, file: !1, line: 3, type: !8) 72!23 = !DILocation(line: 3, column: 37, scope: !4, inlinedAt: !24) 73!24 = distinct !DILocation(line: 3, column: 3, scope: !18) 74!25 = !DILocation(line: 3, column: 41, scope: !4, inlinedAt: !24) 75!26 = !DILocation(line: 4, column: 1, scope: !18) 76