diff options
Diffstat (limited to 'test/DebugInfo/Generic')
-rw-r--r-- | test/DebugInfo/Generic/empty.ll | 9 | ||||
-rw-r--r-- | test/DebugInfo/Generic/nodebug.ll | 13 | ||||
-rw-r--r-- | test/DebugInfo/Generic/skeletoncu.ll | 4 |
3 files changed, 19 insertions, 7 deletions
diff --git a/test/DebugInfo/Generic/empty.ll b/test/DebugInfo/Generic/empty.ll index d5f738fa0271..79912841fa6d 100644 --- a/test/DebugInfo/Generic/empty.ll +++ b/test/DebugInfo/Generic/empty.ll @@ -13,10 +13,9 @@ ; CHECK-NOT: file_names[ ; CHECK: .debug_pubnames contents: -; CHECK-NOT: Offset +; CHECK-NOT: {{^}}0x -; CHECK: .debug_pubtypes contents: -; CHECK-NOT: Offset +; CHECK: contents: ; Don't emit DW_AT_addr_base when there are no addresses. ; FISSION-NOT: DW_AT_GNU_addr_base [DW_FORM_sec_offset] @@ -24,8 +23,10 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!5} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143523)", isOptimized: true, emissionKind: FullDebug, file: !4, enums: !2, retainedTypes: !2, globals: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143523)", isOptimized: true, emissionKind: FullDebug, file: !4, enums: !2, retainedTypes: !6, globals: !2) !2 = !{} !3 = !DIFile(filename: "empty.c", directory: "/home/nlewycky") !4 = !DIFile(filename: "empty.c", directory: "/home/nlewycky") !5 = !{i32 1, !"Debug Info Version", i32 3} +!6 = !{!7} +!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/test/DebugInfo/Generic/nodebug.ll b/test/DebugInfo/Generic/nodebug.ll index f85b00bf9f7e..9b0eb9b4dd07 100644 --- a/test/DebugInfo/Generic/nodebug.ll +++ b/test/DebugInfo/Generic/nodebug.ll @@ -1,6 +1,6 @@ ; REQUIRES: object-emission -; RUN: %llc_dwarf < %s -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s +; RUN: %llc_dwarf < %s -filetype=obj | llvm-dwarfdump - | FileCheck %s ; Test that a nodebug function (a function not appearing in the debug info IR ; metadata subprogram list) with DebugLocs on its IR doesn't cause crashes/does @@ -17,9 +17,16 @@ ; } ; Check that there's no DW_TAG_subprogram, not even for the 'f2' function. +; CHECK: .debug_info contents: ; CHECK: DW_TAG_compile_unit ; CHECK-NOT: DW_TAG_subprogram +; Expect no line table entry since there are no functions and file references in this compile unit +; CHECK: .debug_line contents: +; CHECK: Line table prologue: +; CHECK: total_length: 0x00000019 +; CHECK-NOT: file_names[ + @i = external global i32 ; Function Attrs: uwtable @@ -35,7 +42,7 @@ attributes #0 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"=" !llvm.module.flags = !{!8, !9} !llvm.ident = !{!10} -!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !12, globals: !2, imports: !2) !1 = !DIFile(filename: "nodebug.cpp", directory: "/tmp/dbginfo") !2 = !{} !4 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1v", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2) @@ -46,3 +53,5 @@ attributes #0 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"=" !9 = !{i32 2, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5.0 "} !11 = !DILocation(line: 3, scope: !4) +!12 = !{!13} +!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) diff --git a/test/DebugInfo/Generic/skeletoncu.ll b/test/DebugInfo/Generic/skeletoncu.ll index 6d91afd0fa79..b9761b2ab565 100644 --- a/test/DebugInfo/Generic/skeletoncu.ll +++ b/test/DebugInfo/Generic/skeletoncu.ll @@ -7,9 +7,11 @@ !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4} -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "my.dwo", emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2, dwoId: 43981) +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: false, runtimeVersion: 2, splitDebugFilename: "my.dwo", emissionKind: FullDebug, enums: !2, retainedTypes: !5, globals: !2, imports: !2, dwoId: 43981) !1 = !DIFile(filename: "<stdin>", directory: "/") !2 = !{} !3 = !{i32 2, !"Dwarf Version", i32 4} !4 = !{i32 2, !"Debug Info Version", i32 3} +!5 = !{!6} +!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |