brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · a2038c7 Raw
42 lines · plain
1; RUN: opt -passes='print<module-debuginfo>' -disable-output 2>&1 < %s \2; RUN:   | FileCheck %s3 4; This is to track DebugInfoFinder's ability to find the debug info metadata,5; in particular, properly visit DISubprogram's retainedNodes.6 7; CHECK: Compile unit: DW_LANG_C_plus_plus from /somewhere/source.cpp8; CHECK: Subprogram: foo from /somewhere/source.cpp:1 ('_Z3foov')9; CHECK: Subprogram: bar from /somewhere/source.cpp:510; CHECK: Subprogram: imported from /somewhere/source.cpp:311; CHECK: Type: T from /somewhere/source.cpp:2 DW_TAG_structure_type12 13%struct.T = type { i32 }14 15; Function Attrs: mustprogress noinline nounwind optnone ssp uwtable(sync)16define noundef i32 @_Z3foov() !dbg !7 {17entry:18  ret i32 019}20 21!llvm.dbg.cu = !{!0}22!llvm.module.flags = !{!2, !3, !4, !5}23!llvm.ident = !{!6}24 25!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 21.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)26!1 = !DIFile(filename: "source.cpp", directory: "/somewhere")27!2 = !{i32 7, !"Dwarf Version", i32 5}28!3 = !{i32 2, !"Debug Info Version", i32 3}29!4 = !{i32 1, !"wchar_size", i32 4}30!5 = !{i32 8, !"PIC Level", i32 2}31!6 = !{!"clang version 21.0.0git"}32!7 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 1, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !8)33!8 = !{!9, !15}34!9 = !DILocalVariable(name: "v", scope: !7, file: !1, line: 8, type: !10)35!10 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "T", scope: !7, file: !1, line: 2, size: 32, flags: DIFlagTypePassByValue, elements: !11)36!11 = !{!12, !14}37!12 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !10, file: !1, line: 3, baseType: !13, size: 32)38!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)39!14 = !DISubprogram(name: "bar", scope: !10, file: !1, line: 5, scopeLine: 5, flags: DIFlagPrototyped | DIFlagStaticMember, spFlags: DISPFlagLocalToUnit)40!15 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !7, entity: !16, file: !1, line: 7)41!16 = distinct !DISubprogram(name: "imported", scope: !17, file: !1, line: 3, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0)42!17 = !DINamespace(name: "ns", scope: null)