summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-04-18 15:23:21 +0000
committerPavel Labath <labath@google.com>2018-04-18 15:23:21 +0000
commit10831f594a1d2691a8603584b790dd95e4055a27 (patch)
tree3718ed710521f4c0e44e8f851b775dc58852335a /llvm
parent1f87618f8f45ae470a728c7ea2faeab40f6b3cc5 (diff)
downloadbcm5719-llvm-10831f594a1d2691a8603584b790dd95e4055a27.tar.gz
bcm5719-llvm-10831f594a1d2691a8603584b790dd95e4055a27.zip
Fix macosx build broken by r330249
It seems llc crashes when targetting darwin with split-dwarf (pr37164). This happens on all inputs, not just the one I added in the above commit. Work around the issue by hardcoding the target triple to linux, which is what all split-dwarf tests seem to be doing. As I don't know of a way to specify the os part of the triple without spelling out the architecture as well, I move the new test to the X86 folder. llvm-svn: 330265
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/DebugInfo/Generic/debug-names-one-cu.ll4
-rw-r--r--llvm/test/DebugInfo/X86/debug-names-split-dwarf.ll41
2 files changed, 41 insertions, 4 deletions
diff --git a/llvm/test/DebugInfo/Generic/debug-names-one-cu.ll b/llvm/test/DebugInfo/Generic/debug-names-one-cu.ll
index d9b9c8f2945..69ea641024c 100644
--- a/llvm/test/DebugInfo/Generic/debug-names-one-cu.ll
+++ b/llvm/test/DebugInfo/Generic/debug-names-one-cu.ll
@@ -3,10 +3,6 @@
; RUN: llvm-dwarfdump -debug-names %t | FileCheck %s
; RUN: llvm-dwarfdump -debug-names -verify %t | FileCheck --check-prefix=VERIFY %s
-; Now try the same with split dwarf.
-; RUN: %llc_dwarf -split-dwarf-file=foo.dwo -accel-tables=Dwarf -filetype=obj -o %t < %s
-; RUN: llvm-dwarfdump -debug-names %t | FileCheck %s
-
; Check the header
; CHECK: CU count: 1
; CHECK: Local TU count: 0
diff --git a/llvm/test/DebugInfo/X86/debug-names-split-dwarf.ll b/llvm/test/DebugInfo/X86/debug-names-split-dwarf.ll
new file mode 100644
index 00000000000..5ef1ce105ea
--- /dev/null
+++ b/llvm/test/DebugInfo/X86/debug-names-split-dwarf.ll
@@ -0,0 +1,41 @@
+; REQUIRES: object-emission
+
+; Verify that DWARF v5 accelerator tables work with split-dwarf.
+; RUN: %llc_dwarf -mtriple x86_64-pc-linux -split-dwarf-file=foo.dwo \
+; RUN: -accel-tables=Dwarf -filetype=obj -o %t < %s
+; RUN: llvm-dwarfdump -debug-names - <%t | FileCheck %s
+
+; Check the header
+; CHECK: CU count: 1
+; CHECK: Local TU count: 0
+; CHECK: Foreign TU count: 0
+; CHECK: Name count: 1
+; CHECK: CU[0]: 0x{{[0-9a-f]*}}
+
+; CHECK: Abbreviation [[ABBREV:0x[0-9a-f]*]]
+; CHECK-NEXT: Tag: DW_TAG_variable
+; CHECK-NEXT: DW_IDX_die_offset: DW_FORM_ref4
+
+; CHECK: String: 0x{{[0-9a-f]*}} "foobar"
+; CHECK-NEXT: Entry
+; CHECK-NEXT: Abbrev: [[ABBREV]]
+; CHECK-NEXT: Tag: DW_TAG_variable
+; CHECK-NEXT: DW_IDX_die_offset: 0x{{[0-9a-f]*}}
+
+@foobar = common dso_local global i8* null, align 8, !dbg !0
+
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!7, !8, !9}
+!llvm.ident = !{!10}
+
+!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+!1 = distinct !DIGlobalVariable(name: "foobar", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 7.0.0 (trunk 325496) (llvm/trunk 325732)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "/tmp/cu1.c", directory: "/tmp")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
+!7 = !{i32 2, !"Dwarf Version", i32 4}
+!8 = !{i32 2, !"Debug Info Version", i32 3}
+!9 = !{i32 1, !"wchar_size", i32 4}
+!10 = !{!"clang version 7.0.0 (trunk 325496) (llvm/trunk 325732)"}
OpenPOWER on IntegriCloud