summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-09-12 21:50:41 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-09-12 21:50:41 +0000
commitb52e23669cbd8637819d9ff7777d43cbc3bf8f31 (patch)
tree50b6f514a58df8209c56928ac50a4fa1bc041c6e /llvm/test/DebugInfo
parente4dacb750da45f4183ae67868d7283a89efe0b40 (diff)
downloadbcm5719-llvm-b52e23669cbd8637819d9ff7777d43cbc3bf8f31.tar.gz
bcm5719-llvm-b52e23669cbd8637819d9ff7777d43cbc3bf8f31.zip
IR: Represent -ggnu-pubnames with a flag on the DICompileUnit.
This allows the flag to be persisted through to LTO. Differential Revision: https://reviews.llvm.org/D37655 llvm-svn: 313078
Diffstat (limited to 'llvm/test/DebugInfo')
-rw-r--r--llvm/test/DebugInfo/X86/gnu-public-names-empty.ll4
-rw-r--r--llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll4
-rw-r--r--llvm/test/DebugInfo/X86/gnu-public-names-multiple-cus.ll24
-rw-r--r--llvm/test/DebugInfo/X86/gnu-public-names-tu.ll4
-rw-r--r--llvm/test/DebugInfo/X86/gnu-public-names.ll6
5 files changed, 33 insertions, 9 deletions
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names-empty.ll b/llvm/test/DebugInfo/X86/gnu-public-names-empty.ll
index e3afd478171..2ba26b6aa8a 100644
--- a/llvm/test/DebugInfo/X86/gnu-public-names-empty.ll
+++ b/llvm/test/DebugInfo/X86/gnu-public-names-empty.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-gnu-dwarf-pub-sections -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s
+; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s
; Generated from:
@@ -17,7 +17,7 @@
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 191846) (llvm/trunk 191866)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !5, globals: !2, imports: !2)
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 191846) (llvm/trunk 191866)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !5, globals: !2, imports: !2, gnuPubnames: true)
!1 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo/tmp")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll b/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
index dd2856e11cd..2cd37a54f84 100644
--- a/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
+++ b/llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s -generate-gnu-dwarf-pub-sections | llvm-dwarfdump -v - | FileCheck --check-prefix=GPUB --check-prefix=CHECK %s
+; RUN: sed -e 's/gnuPubnames: false/gnuPubnames: true/' %s | llc -mtriple=x86_64-pc-linux-gnu -filetype=obj | llvm-dwarfdump -v - | 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 -v - | FileCheck --check-prefix=PUB --check-prefix=CHECK %s
; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck --check-prefix=NONE %s
@@ -53,7 +53,7 @@ attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-
!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)
+!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, gnuPubnames: false)
!1 = !DIFile(filename: "gnu-public-names-gmlt.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names-multiple-cus.ll b/llvm/test/DebugInfo/X86/gnu-public-names-multiple-cus.ll
new file mode 100644
index 00000000000..990360cc250
--- /dev/null
+++ b/llvm/test/DebugInfo/X86/gnu-public-names-multiple-cus.ll
@@ -0,0 +1,24 @@
+; RUN: llc < %s | FileCheck %s
+
+!llvm.dbg.cu = !{!4, !11}
+!llvm.module.flags = !{!7}
+
+; CHECK: .section .debug_pubnames
+; CHECK: .asciz "a"
+
+!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "g.c", directory: "/tmp")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6)
+!5 = !{}
+!6 = !{!0}
+!7 = !{i32 1, !"Debug Info Version", i32 3}
+
+; CHECK: .section .debug_gnu_pubnames
+; CHECK: .asciz "b"
+
+!8 = !DIGlobalVariableExpression(var: !9, expr: !DIExpression())
+!9 = !DIGlobalVariable(name: "b", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
+!10 = !{!8}
+!11 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !10, gnuPubnames: true)
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names-tu.ll b/llvm/test/DebugInfo/X86/gnu-public-names-tu.ll
index a9a34c2a50e..2a9bc9602f9 100644
--- a/llvm/test/DebugInfo/X86/gnu-public-names-tu.ll
+++ b/llvm/test/DebugInfo/X86/gnu-public-names-tu.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-type-units -generate-gnu-dwarf-pub-sections -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s
+; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-type-units -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s
; Generated from:
@@ -39,7 +39,7 @@
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !3, line: 8, type: !6, isLocal: false, isDefinition: true)
-!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 5.0.0 (trunk 293904) (llvm/trunk 293908)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 5.0.0 (trunk 293904) (llvm/trunk 293908)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, gnuPubnames: true)
!3 = !DIFile(filename: "type.cpp", directory: "/tmp/dbginfo")
!4 = !{}
!5 = !{!0}
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names.ll b/llvm/test/DebugInfo/X86/gnu-public-names.ll
index 34f58b387e4..5e93bf4ab2a 100644
--- a/llvm/test/DebugInfo/X86/gnu-public-names.ll
+++ b/llvm/test/DebugInfo/X86/gnu-public-names.ll
@@ -1,5 +1,5 @@
-; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-gnu-dwarf-pub-sections < %s | FileCheck -check-prefix=ASM %s
-; RUN: llc -mtriple=x86_64-pc-linux-gnu -generate-gnu-dwarf-pub-sections -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s
+; RUN: llc -mtriple=x86_64-pc-linux-gnu < %s | FileCheck -check-prefix=ASM %s
+; RUN: llc -mtriple=x86_64-pc-linux-gnu -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s
; ModuleID = 'dwarf-public-names.cpp'
;
; Generated from:
@@ -302,7 +302,7 @@ attributes #1 = { nounwind readnone }
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true, declaration: !8)
-!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !21, imports: !44)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !21, imports: !44, gnuPubnames: true)
!3 = !DIFile(filename: "gnu-public-names.cpp", directory: "/tmp/dbginfo")
!4 = !{}
!5 = !{!6, !17}
OpenPOWER on IntegriCloud