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
This commit is contained in:
Adrian Prantl 2017-07-31 20:48:52 +00:00
parent 8867b216dc
commit 56619fa7e9
4 changed files with 18 additions and 0 deletions

View File

@ -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
;

View File

@ -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)

View File

@ -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"

View File

@ -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"