aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineBasicBlock.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-26 02:19:36 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-26 02:19:36 +0000
commitadb877d62e5ac88db037d91bcd2e9f7dc2c4cd7a (patch)
treefaf27fdac824ef293a98e063205152c8992b233a /include/llvm/CodeGen/MachineBasicBlock.h
parenteca915fb5242442756a80bad7f285cb54d7b8ea4 (diff)
Collect and coalesce DBG_VALUE instructions before emitting the function.
Correctly terminate the range of register DBG_VALUEs when the register is clobbered or when the basic block ends. The code is now ready to deal with variables that are sometimes in a register and sometimes on the stack. We just need to teach emitDebugLoc to say 'stack slot'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineBasicBlock.h')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index 1906093388..5a6581c21c 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -309,6 +309,10 @@ public:
/// instruction in the basic block, or end()
iterator getLastNonDebugInstr();
+ const_iterator getLastNonDebugInstr() const {
+ return const_cast<MachineBasicBlock*>(this)->getLastNonDebugInstr();
+ }
+
/// SplitCriticalEdge - Split the critical edge from this block to the
/// given successor block, and return the newly created block, or null
/// if splitting is not possible.