diff options
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/DebugInfo/Generic/empty.ll | 8 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/empty.ll | 9 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/gnu-public-names-empty.ll | 5 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll | 68 |
4 files changed, 86 insertions, 4 deletions
diff --git a/llvm/test/DebugInfo/Generic/empty.ll b/llvm/test/DebugInfo/Generic/empty.ll index d5f738fa027..f8bc2c0f280 100644 --- a/llvm/test/DebugInfo/Generic/empty.ll +++ b/llvm/test/DebugInfo/Generic/empty.ll @@ -13,10 +13,14 @@ ; CHECK-NOT: file_names[ ; CHECK: .debug_pubnames contents: -; CHECK-NOT: Offset +; CHECK-NEXT: length = 0x0000000e +; CHECK-NEXT: Offset +; CHECK-NEXT: {{^$}} ; CHECK: .debug_pubtypes contents: -; CHECK-NOT: Offset +; CHECK-NEXT: length = 0x0000000e +; CHECK-NEXT: Offset +; CHECK-NEXT: {{^$}} ; Don't emit DW_AT_addr_base when there are no addresses. ; FISSION-NOT: DW_AT_GNU_addr_base [DW_FORM_sec_offset] diff --git a/llvm/test/DebugInfo/X86/empty.ll b/llvm/test/DebugInfo/X86/empty.ll index 774b908adb3..a91e0d59dd5 100644 --- a/llvm/test/DebugInfo/X86/empty.ll +++ b/llvm/test/DebugInfo/X86/empty.ll @@ -8,10 +8,15 @@ ; CHECK-NOT: file_names[ ; CHECK: .debug_pubnames contents: -; CHECK-NOT: Offset +; CHECK-NEXT: length = 0x0000000e +; CHECK-NEXT: Offset +; CHECK-NEXT: {{^$}} ; CHECK: .debug_pubtypes contents: -; CHECK-NOT: Offset +; CHECK-NEXT: length = 0x0000000e +; CHECK-NEXT: Offset +; CHECK-NEXT: {{^$}} + ; Don't emit DW_AT_addr_base when there are no addresses. ; FISSION-NOT: DW_AT_GNU_addr_base [DW_FORM_sec_offset] diff --git a/llvm/test/DebugInfo/X86/gnu-public-names-empty.ll b/llvm/test/DebugInfo/X86/gnu-public-names-empty.ll index b04f7af6490..069674c7d18 100644 --- a/llvm/test/DebugInfo/X86/gnu-public-names-empty.ll +++ b/llvm/test/DebugInfo/X86/gnu-public-names-empty.ll @@ -9,6 +9,11 @@ ; CHECK: DW_AT_GNU_pubnames [DW_FORM_flag_present] (true) ; CHECK-NOT: DW_AT_GNU_pubtypes [ +; CHECK: .debug_gnu_pubnames contents: +; CHECK-NEXT: length = 0x0000000e +; CHECK-NEXT: Offset +; CHECK-NEXT: {{^$}} + !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4} diff --git a/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll b/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll new file mode 100644 index 00000000000..569f56a50af --- /dev/null +++ b/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll @@ -0,0 +1,68 @@ +; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s -generate-gnu-dwarf-pub-sections | llvm-dwarfdump - | FileCheck --check-prefix=GPUB --check-prefix=CHECK %s +; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s -generate-dwarf-pub-sections=Enable | llvm-dwarfdump - | FileCheck --check-prefix=PUB --check-prefix=CHECK %s +; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s | llvm-dwarfdump - | FileCheck --check-prefix=NONE %s + +; Generated from: +; void f1(); +; inline __attribute__((always_inline)) void f2() { +; f1(); +; } +; void f3() { +; f2(); +; } +; $ clang++ -gmlt %s -emit-llvm -S + +; GPUB: Compile Unit +; GPUB: DW_AT_GNU_pubnames + +; GPUB: .debug_gnu_pubnames contents: +; PUB: .debug_pubnames contents: +; CHECK-NEXT: unit_offset = 0x00000000 +; CHECK-NEXT: Name +; CHECK-NEXT: "f2" +; CHECK-NEXT: "f3" + +; GPUB: .debug_gnu_pubtypes contents: +; PUB: .debug_pubtypes contents: +; CHECK-NEXT: length = 0x0000000e version = 0x0002 unit_offset = 0x00000000 +; CHECK-NEXT: Name + +; NONE: .debug_pubnames contents: +; NONE: {{^$}} +; NONE: .debug_pubtypes contents: +; NONE: {{^$}} +; NONE: .debug_gnu_pubnames contents: +; NONE: {{^$}} +; NONE: .debug_gnu_pubtypes contents: +; NONE: {{^$}} + + +; Function Attrs: noinline uwtable +define void @_Z2f3v() #0 !dbg !7 { +entry: + call void @_Z2f1v(), !dbg !9 + ret void, !dbg !12 +} + +declare void @_Z2f1v() #1 + +attributes #0 = { noinline uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4, !5} +!llvm.ident = !{!6} + +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 5.0.0 (trunk 303768) (llvm/trunk 303774)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2) +!1 = !DIFile(filename: "gnu-public-names-gmlt.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch") +!2 = !{} +!3 = !{i32 2, !"Dwarf Version", i32 4} +!4 = !{i32 2, !"Debug Info Version", i32 3} +!5 = !{i32 1, !"wchar_size", i32 4} +!6 = !{!"clang version 5.0.0 (trunk 303768) (llvm/trunk 303774)"} +!7 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 5, type: !8, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) +!8 = !DISubroutineType(types: !2) +!9 = !DILocation(line: 3, column: 3, scope: !10, inlinedAt: !11) +!10 = distinct !DISubprogram(name: "f2", scope: !1, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2) +!11 = distinct !DILocation(line: 6, column: 3, scope: !7) +!12 = !DILocation(line: 7, column: 1, scope: !7) |

