Summary: Verify that each DBG_VALUE has a debug location. This is required by LiveDebugValues, and perhaps by other late passes. There's an exception for tests: lots of tests use a two-operand form of DBG_VALUE for convenience. There's no reason to prevent that. This is an extension of D80665, but there's no dependency. Reviewers: aprantl, jmorse, davide, chrisjackson Subscribers: hiraditya, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80670
20 lines
327 B
YAML
20 lines
327 B
YAML
# RUN: not --crash llc -run-pass machineverifier -o - %s 2>&1 | FileCheck %s
|
|
|
|
# CHECK: Bad machine code: Missing DebugLoc for debug instruction
|
|
# CHECK: - instruction: DBG_VALUE 1, 2, 3, 4
|
|
|
|
--- |
|
|
|
|
define i32 @foo() {
|
|
entry:
|
|
ret i32 0
|
|
}
|
|
|
|
...
|
|
---
|
|
name: foo
|
|
body: |
|
|
bb.0.entry:
|
|
DBG_VALUE 1, 2, 3, 4
|
|
...
|