summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2017-07-31 20:48:52 +0000
committerAdrian Prantl <aprantl@apple.com>2017-07-31 20:48:52 +0000
commit56619fa7e9fbf5b33ef7578c55420598e453f29b (patch)
tree636de1a7a3018938da1d76ab869791678bde693c
parent8867b216dc9635a922c0fe0766c76f60c2266c60 (diff)
downloadbcm5719-llvm-56619fa7e9fbf5b33ef7578c55420598e453f29b.tar.gz
bcm5719-llvm-56619fa7e9fbf5b33ef7578c55420598e453f29b.zip
Debug Info: Also check the DWARF output in assembler-only test cases
This will prevent me from introducing a regression in my next commit. llvm-svn: 309623
-rw-r--r--llvm/test/DebugInfo/ARM/PR16736.ll5
-rw-r--r--llvm/test/DebugInfo/X86/dbg-value-frame-index.ll4
-rw-r--r--llvm/test/DebugInfo/X86/debug-loc-asan.ll6
-rw-r--r--llvm/test/DebugInfo/X86/pieces-4.ll3
4 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/ARM/PR16736.ll b/llvm/test/DebugInfo/ARM/PR16736.ll
index 994cba09ac3..59fb225902c 100644
--- a/llvm/test/DebugInfo/ARM/PR16736.ll
+++ b/llvm/test/DebugInfo/ARM/PR16736.ll
@@ -1,5 +1,10 @@
; RUN: llc -filetype=asm < %s | FileCheck %s
+; RUN: llc -filetype=obj < %s \
+; RUN: | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF
+;
; CHECK: @DEBUG_VALUE: h:x <- [%R{{.*}}+{{.*}}]
+; DWARF: Location description: {{7[0-9] [0-9]+ $}}
+; DW_OP_breg. +..
; generated from:
; clang -cc1 -triple thumbv7 -S -O1 arm.cpp -g
;
diff --git a/llvm/test/DebugInfo/X86/dbg-value-frame-index.ll b/llvm/test/DebugInfo/X86/dbg-value-frame-index.ll
index fbd11b902c3..0ac4dde3df0 100644
--- a/llvm/test/DebugInfo/X86/dbg-value-frame-index.ll
+++ b/llvm/test/DebugInfo/X86/dbg-value-frame-index.ll
@@ -1,4 +1,6 @@
; RUN: llc -mtriple=x86_64-unknown-unknown -o - %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-unknown-unknown -filetype=obj < %s \
+; RUN: | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF
define i1 @test() !dbg !4 {
entry:
@@ -19,6 +21,8 @@ while.end:
; CHECK-LABEL: test
; CHECK: #DEBUG_VALUE: test:w <- [%RSP+8]
+; DWARF: Location description: 77 08
+; DW_OP_breg7 +8
declare i1 @fn(i64*, i64*, i64*, i8*, i64, i64*, i32*, i8*)
declare void @llvm.dbg.value(metadata, metadata, metadata)
diff --git a/llvm/test/DebugInfo/X86/debug-loc-asan.ll b/llvm/test/DebugInfo/X86/debug-loc-asan.ll
index 8f798094dff..ece93b9e89f 100644
--- a/llvm/test/DebugInfo/X86/debug-loc-asan.ll
+++ b/llvm/test/DebugInfo/X86/debug-loc-asan.ll
@@ -1,4 +1,6 @@
; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
+; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %s \
+; RUN: | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF
; Verify that we have correct debug info for local variables in code
; instrumented with AddressSanitizer.
@@ -28,6 +30,8 @@
; CHECK: .quad .Lfunc_begin0-.Lfunc_begin0
; CHECK-NEXT: .quad [[START_LABEL]]-.Lfunc_begin0
; CHECK: DW_OP_breg5
+; DWARF: Location description: 75 00 06
+; DW_OP_breg5+0 DW_OP_deref
; Then it's addressed via %rsp:
; CHECK: .quad [[START_LABEL]]-.Lfunc_begin0
@@ -35,6 +39,8 @@
; CHECK: DW_OP_breg7
; CHECK-NEXT: [[OFFSET]]
; CHECK: DW_OP_deref
+; DWARF: Location description: {{77 .. 06 06}}
+; DW_OP_breg7+OFFSET DW_OP_deref DW_OP_deref
; ModuleID = 'test.cc'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/llvm/test/DebugInfo/X86/pieces-4.ll b/llvm/test/DebugInfo/X86/pieces-4.ll
index a6a584fd57a..105f4bed16d 100644
--- a/llvm/test/DebugInfo/X86/pieces-4.ll
+++ b/llvm/test/DebugInfo/X86/pieces-4.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s | FileCheck %s
+; RUN: llc -filetype=obj < %s | llvm-dwarfdump - | FileCheck %s --check-prefix=DWARF
; Compile the following with -O1:
@@ -21,6 +22,8 @@
; CHECK: #NO_APP
; CHECK: movl [[offs]](%rsp), %eax # 4-byte Reload
; CHECK: retq
+; DWARF: Location description: {{77 .. 93 04 10 00 9f 93 04}}
+; DW_OP_breg7+offs DW_OP_piece 4 DW_OP_constu 0 DW_OP_stack_value DW_OP_piece 4
; ModuleID = 't.c'
source_filename = "t.c"
OpenPOWER on IntegriCloud