[MachineBasicBlock] Add getFirstNonDebugInstr to complement getLastNonDebugInstr
[oota-llvm.git] / include / llvm / CodeGen / MachineBasicBlock.h
index a13b78870d4daf8c71327feff84a7c589dd6f0d3..4fe9cf5e72310ce93d0ab750e987c4eacdf3513b 100644 (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();