76 lines · plain
1; REQUIRES: x86-registered-target2; 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 contents5; CHECK: DW_TAG_compile_unit6; CHECK: DW_AT_GNU_dwo_name7; CHECK: DW_AT_GNU_dwo_id8; CHECK: DW_TAG_subprogram9; CHECK: DW_TAG_subprogram10; CHECK: DW_TAG_inlined_subroutine11; CHECK: NULL12; CHECK: NULL13 14; CHECK-LABEL: debug_info.dwo contents15 16; CHECK: DW_TAG_compile_unit17; CHECK: DW_TAG_subprogram18; CHECK: DW_TAG_imported_declaration19; CHECK: NULL20; CHECK: DW_TAG_subprogram21; CHECK: DW_TAG_inlined_subroutine22; CHECK: NULL23; CHECK: DW_TAG_namespace24; CHECK: DW_TAG_structure_type25; CHECK: NULL26; CHECK: DW_TAG_base_type27; CHECK: NULL28 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_addr37 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 !2341 call void @_Z3pinv(), !dbg !2542 ret i32 0, !dbg !2643}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