Simplify some getNode calls.
[oota-llvm.git] / lib / VMCore / BasicBlock.cpp
index 17469d6bdb2f9b1d61f03977eddd909249568ad9..64711fea0c7751861c084cb6f5dfff8e0fbc929b 100644 (file)
@@ -143,15 +143,14 @@ const TerminatorInst *BasicBlock::getTerminator() const {
   return dyn_cast<TerminatorInst>(&InstList.back());
 }
 
-Instruction* BasicBlock::getFirstNonPHI()
-{
-    BasicBlock::iterator i = begin();
-    // All valid basic blocks should have a terminator,
-    // which is not a PHINode. If we have invalid basic
-    // block we'll get assert when dereferencing past-the-end
-    // iterator.
-    while (isa<PHINode>(i)) ++i;
-    return &*i;
+Instruction* BasicBlock::getFirstNonPHI() {
+  BasicBlock::iterator i = begin();
+  // All valid basic blocks should have a terminator,
+  // which is not a PHINode. If we have an invalid basic
+  // block we'll get an assertion failure when dereferencing
+  // a past-the-end iterator.
+  while (isa<PHINode>(i)) ++i;
+  return &*i;
 }
 
 void BasicBlock::dropAllReferences() {