[MachineBasicBlock] Add getFirstNonDebugInstr to complement getLastNonDebugInstr

Use it in CodeGen where applicable. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240414 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer
2015-06-23 14:47:29 +00:00
parent d18bb88b2e
commit 336ead08bd
5 changed files with 37 additions and 70 deletions

View File

@ -469,6 +469,13 @@ public:
/// and return an instr_iterator instead.
instr_iterator getFirstInstrTerminator();
/// getFirstNonDebugInstr - returns an iterator to the first non-debug
/// instruction in the basic block, or end()
iterator getFirstNonDebugInstr();
const_iterator getFirstNonDebugInstr() const {
return const_cast<MachineBasicBlock *>(this)->getFirstNonDebugInstr();
}
/// getLastNonDebugInstr - returns an iterator to the last non-debug
/// instruction in the basic block, or end()
iterator getLastNonDebugInstr();