|
@@ -2,45 +2,63 @@
|
|
|
|
|
|
; Verify that DWARF v5 debug_names omit names from CUs that opt-out.
|
|
|
; RUN: llc -mtriple x86_64-pc-linux -filetype=obj < %s \
|
|
|
-; RUN: | llvm-dwarfdump -debug-names - | FileCheck %s
|
|
|
+; RUN: | llvm-dwarfdump -debug-info -debug-names - | FileCheck %s
|
|
|
|
|
|
-; CHECK: CU count: 1
|
|
|
|
|
|
; Check that the one CU that is indexed has a non-zero.
|
|
|
; Avoid checking for a specific offset to make the test more resilient.
|
|
|
+; CHECK: [[CU1OFF:0x00000000]]: Compile Unit:
|
|
|
+; CHECK: [[CU2OFF:0x[0-9a-f]{8}]]: Compile Unit:
|
|
|
+; CHECK: [[CU3OFF:0x[0-9a-f]{8}]]: Compile Unit:
|
|
|
+
|
|
|
+; CHECK: CU count: 2
|
|
|
; CHECK: Compilation Unit offsets [
|
|
|
-; CHECK-NEXT: CU[0]: 0x{{[0-9]*[1-9][0-9]*}}
|
|
|
+; CHECK-NEXT: CU[0]: [[CU1OFF]]
|
|
|
+; CHECK-NEXT: CU[1]: [[CU3OFF]]
|
|
|
; CHECK-NEXT: ]
|
|
|
+; CHECK-NOT: DW_IDX_compile_unit: 0x02
|
|
|
+; CHECK: String: {{.*}} "f3"
|
|
|
+; CHECK-NOT: DW_IDX_compile_unit
|
|
|
+; CHECK: DW_IDX_compile_unit: 0x01
|
|
|
+
|
|
|
+; Function Attrs: noinline nounwind optnone uwtable
|
|
|
+define dso_local void @_Z2f1v() !dbg !11 {
|
|
|
+entry:
|
|
|
+ ret void, !dbg !14
|
|
|
+}
|
|
|
|
|
|
-define dso_local i32 @main() !dbg !9 {
|
|
|
+; Function Attrs: noinline nounwind optnone uwtable
|
|
|
+define dso_local void @_Z2f2v() !dbg !15 {
|
|
|
entry:
|
|
|
- ret i32 0, !dbg !13
|
|
|
+ ret void, !dbg !16
|
|
|
}
|
|
|
|
|
|
-define dso_local void @_Z2f1v() !dbg !14 {
|
|
|
+; Function Attrs: noinline nounwind optnone uwtable
|
|
|
+define dso_local void @_Z2f3v() !dbg !17 {
|
|
|
entry:
|
|
|
- ret void, !dbg !17
|
|
|
+ ret void, !dbg !18
|
|
|
}
|
|
|
|
|
|
-!llvm.dbg.cu = !{!0, !3}
|
|
|
-!llvm.ident = !{!5, !5}
|
|
|
-!llvm.module.flags = !{!6, !7, !8}
|
|
|
+!llvm.dbg.cu = !{!0, !3, !5}
|
|
|
+!llvm.ident = !{!7, !7, !7}
|
|
|
+!llvm.module.flags = !{!8, !9, !10}
|
|
|
|
|
|
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 8.0.0 (trunk 339438) (llvm/trunk 339448)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
|
|
|
-!1 = !DIFile(filename: "foo.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch", checksumkind: CSK_MD5, checksum: "f881137628fc8dd673b761eb7a1e2432")
|
|
|
+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 8.0.0 (trunk 340586) (llvm/trunk 340588)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: Default)
|
|
|
+!1 = !DIFile(filename: "f1.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch", checksumkind: CSK_MD5, checksum: "5cf4a85ae773dd04a42282b1a708a179")
|
|
|
!2 = !{}
|
|
|
-!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !4, producer: "clang version 8.0.0 (trunk 339438) (llvm/trunk 339448)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
|
|
|
-!4 = !DIFile(filename: "bar.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch", checksumkind: CSK_MD5, checksum: "ba8dae3bceaf6ef87728337164565a87")
|
|
|
-!5 = !{!"clang version 8.0.0 (trunk 339438) (llvm/trunk 339448)"}
|
|
|
-!6 = !{i32 2, !"Dwarf Version", i32 5}
|
|
|
-!7 = !{i32 2, !"Debug Info Version", i32 3}
|
|
|
-!8 = !{i32 1, !"wchar_size", i32 4}
|
|
|
-!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
|
|
|
-!10 = !DISubroutineType(types: !11)
|
|
|
-!11 = !{!12}
|
|
|
-!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
|
-!13 = !DILocation(line: 1, column: 13, scope: !9)
|
|
|
-!14 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", scope: !4, file: !4, line: 1, type: !15, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !3, retainedNodes: !2)
|
|
|
-!15 = !DISubroutineType(types: !16)
|
|
|
-!16 = !{null}
|
|
|
-!17 = !DILocation(line: 1, column: 12, scope: !14)
|
|
|
+!3 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !4, producer: "clang version 8.0.0 (trunk 340586) (llvm/trunk 340588)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
|
|
|
+!4 = !DIFile(filename: "f2.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch", checksumkind: CSK_MD5, checksum: "17efa328ddcbb22a3043feeec3190783")
|
|
|
+!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "clang version 8.0.0 (trunk 340586) (llvm/trunk 340588)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: Default)
|
|
|
+!6 = !DIFile(filename: "f3.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch", checksumkind: CSK_MD5, checksum: "73ed062a3b287e0193c695c550d2cef2")
|
|
|
+!7 = !{!"clang version 8.0.0 (trunk 340586) (llvm/trunk 340588)"}
|
|
|
+!8 = !{i32 2, !"Dwarf Version", i32 5}
|
|
|
+!9 = !{i32 2, !"Debug Info Version", i32 3}
|
|
|
+!10 = !{i32 1, !"wchar_size", i32 4}
|
|
|
+!11 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", scope: !1, file: !1, line: 1, type: !12, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
|
|
|
+!12 = !DISubroutineType(types: !13)
|
|
|
+!13 = !{null}
|
|
|
+!14 = !DILocation(line: 2, column: 1, scope: !11)
|
|
|
+!15 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", scope: !4, file: !4, line: 1, type: !12, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !3, retainedNodes: !2)
|
|
|
+!16 = !DILocation(line: 2, column: 1, scope: !15)
|
|
|
+!17 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !6, file: !6, line: 1, type: !12, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !5, retainedNodes: !2)
|
|
|
+!18 = !DILocation(line: 2, column: 1, scope: !17)
|