aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-06-23 14:47:18 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-06-23 14:47:18 +0000
commit9c956b33d7ac69e0ef4346cfa426c64c9ab3b8e0 (patch)
tree3a68c172f1d45cc8e69ee8549260f6920ed6a979 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent4daa9f1e105dc552f9e2e0f5c89ed6a822e7f4d9 (diff)
downloadllvm-9c956b33d7ac69e0ef4346cfa426c64c9ab3b8e0.zip
llvm-9c956b33d7ac69e0ef4346cfa426c64c9ab3b8e0.tar.gz
llvm-9c956b33d7ac69e0ef4346cfa426c64c9ab3b8e0.tar.bz2
[MachineBasicBlock] Use the const_cast(this) trick to reduce duplication
NFC. llvm-svn: 240413
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index d5fdf8e..cfdf5a6 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -171,16 +171,6 @@ MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() {
return I;
}
-MachineBasicBlock::const_iterator
-MachineBasicBlock::getFirstTerminator() const {
- const_iterator B = begin(), E = end(), I = E;
- while (I != B && ((--I)->isTerminator() || I->isDebugValue()))
- ; /*noop */
- while (I != E && !I->isTerminator())
- ++I;
- return I;
-}
-
MachineBasicBlock::instr_iterator MachineBasicBlock::getFirstInstrTerminator() {
instr_iterator B = instr_begin(), E = instr_end(), I = E;
while (I != B && ((--I)->isTerminator() || I->isDebugValue()))
@@ -204,21 +194,6 @@ MachineBasicBlock::iterator MachineBasicBlock::getLastNonDebugInstr() {
return end();
}
-MachineBasicBlock::const_iterator
-MachineBasicBlock::getLastNonDebugInstr() const {
- // Skip over end-of-block dbg_value instructions.
- const_instr_iterator B = instr_begin(), I = instr_end();
- while (I != B) {
- --I;
- // Return instruction that starts a bundle.
- if (I->isDebugValue() || I->isInsideBundle())
- continue;
- return I;
- }
- // The block is all debug values.
- return end();
-}
-
const MachineBasicBlock *MachineBasicBlock::getLandingPadSuccessor() const {
// A block with a landing pad successor only has one other successor.
if (succ_size() > 2)