diff options
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/Instructions.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 674e077..0792550 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1036,7 +1036,7 @@ void AssemblyWriter::printBasicBlock(const BasicBlock *BB) { if (BB->getParent() == 0) Out << "\t\t; Error: Block without parent!"; else { - if (BB != &BB->getParent()->front()) { // Not the entry block? + if (BB != &BB->getParent()->getEntryBlock()) { // Not the entry block? // Output predecessors for the block... Out << "\t\t;"; pred_const_iterator PI = pred_begin(BB), PE = pred_end(BB); diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 8c836a2..c7da56b 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -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. |