Change uses of Function::front to Function::getEntryBlock for readability.
[oota-llvm.git] / lib / Transforms / Scalar / ScalarReplAggregates.cpp
index a26fcbefe810ff5716715e2111727117a5a54c97..a29fe4ad3eb83fd44c52fb33970990abf24e785f 100644 (file)
@@ -891,7 +891,7 @@ void SROA::ConvertToScalar(AllocationInst *AI, const Type *ActualTy) {
   ++NumConverted;
   
   BasicBlock *EntryBlock = AI->getParent();
-  assert(EntryBlock == &EntryBlock->getParent()->front() &&
+  assert(EntryBlock == &EntryBlock->getParent()->getEntryBlock() &&
          "Not in the entry block!");
   EntryBlock->getInstList().remove(AI);  // Take the alloca out of the program.