Change uses of Function::front to Function::getEntryBlock for readability.
[oota-llvm.git] / lib / VMCore / Instructions.cpp
index 8c836a2515cef6d9e0e608a5daef360e61dd6bed..c7da56b96ff9784b490fa535808e317dcad8fea6 100644 (file)
@@ -170,7 +170,7 @@ Value *PHINode::hasConstantValue(bool AllowNonDominatingInstruction) const {
   if (HasUndefInput && !AllowNonDominatingInstruction)
     if (Instruction *IV = dyn_cast<Instruction>(InVal))
       // If it's in the entry block, it dominates everything.
-      if (IV->getParent() != &IV->getParent()->getParent()->front() ||
+      if (IV->getParent() != &IV->getParent()->getParent()->getEntryBlock() ||
           isa<InvokeInst>(IV))
         return 0;   // Cannot guarantee that InVal dominates this PHINode.