fix two comment thinkos
[oota-llvm.git] / lib / CodeGen / MachineBasicBlock.cpp
index 95b8f86df8d9a8c2cf3846f40fb7d5ceb6c9b469..ccbff0af5b2ca4cf19d621f4afcf5dbe9b4411cd 100644 (file)
@@ -175,6 +175,16 @@ MachineBasicBlock::iterator MachineBasicBlock::getLastNonDebugInstr() {
   return end();
 }
 
+const MachineBasicBlock *MachineBasicBlock::getLandingPadSuccessor() const {
+  // A block with a landing pad successor only has one other successor.
+  if (succ_size() > 2)
+    return 0;
+  for (const_succ_iterator I = succ_begin(), E = succ_end(); I != E; ++I)
+    if ((*I)->isLandingPad())
+      return *I;
+  return 0;
+}
+
 void MachineBasicBlock::dump() const {
   print(dbgs());
 }