diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-09-16 23:29:03 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-09-16 23:29:03 +0000 |
commit | 818833f27929d650b4323774cd3660860588f687 (patch) | |
tree | 7ef5607518c2cf454483130b61d27a823ecb4a5d /include | |
parent | 4b28ee208895d2a9c98b9e63d0c39985500e9291 (diff) | |
download | llvm-818833f27929d650b4323774cd3660860588f687.tar.gz llvm-818833f27929d650b4323774cd3660860588f687.tar.bz2 llvm-818833f27929d650b4323774cd3660860588f687.tar.xz |
Debug info: Fix PR16736 and rdar://problem/14990587.
A DBG_VALUE is register-indirect iff the first operand is a register
_and_ the second operand is an immediate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index e54c5c5174..c67c729b77 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -637,6 +637,13 @@ public: bool isEHLabel() const { return getOpcode() == TargetOpcode::EH_LABEL; } bool isGCLabel() const { return getOpcode() == TargetOpcode::GC_LABEL; } bool isDebugValue() const { return getOpcode() == TargetOpcode::DBG_VALUE; } + /// A DBG_VALUE is indirect iff the first operand is a register and + /// the second operand is an immediate. + bool isIndirectDebugValue() const { + return (getOpcode() == TargetOpcode::DBG_VALUE) + && getOperand(0).isReg() + && getOperand(1).isImm(); + } bool isPHI() const { return getOpcode() == TargetOpcode::PHI; } bool isKill() const { return getOpcode() == TargetOpcode::KILL; } |