De-duplicate common expression, NFC.

llvm-svn: 239736
This commit is contained in:
Yaron Keren 2015-06-15 17:03:35 +00:00
parent 8c25ff7ebc
commit fd88932f59

View File

@ -26,9 +26,9 @@ Instruction::Instruction(Type *ty, unsigned it, Use *Ops, unsigned NumOps,
// If requested, insert this instruction into a basic block...
if (InsertBefore) {
assert(InsertBefore->getParent() &&
"Instruction to insert before is not in a basic block!");
InsertBefore->getParent()->getInstList().insert(InsertBefore, this);
BasicBlock *BB = InsertBefore->getParent();
assert(BB && "Instruction to insert before is not in a basic block!");
BB->getInstList().insert(InsertBefore, this);
}
}