De-duplicate common expression, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239736 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Yaron Keren
2015-06-15 17:03:35 +00:00
parent b4c2481907
commit 698a7e58e0

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 requested, insert this instruction into a basic block...
if (InsertBefore) { if (InsertBefore) {
assert(InsertBefore->getParent() && BasicBlock *BB = InsertBefore->getParent();
"Instruction to insert before is not in a basic block!"); assert(BB && "Instruction to insert before is not in a basic block!");
InsertBefore->getParent()->getInstList().insert(InsertBefore, this); BB->getInstList().insert(InsertBefore, this);
} }
} }