diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-06-21 13:59:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-06-21 13:59:01 +0000 |
commit | 3a0822f094b578157263e04114075ad7df81db41 (patch) | |
tree | bc48361fe2cd1ca5f93ac01b38b183774468fc79 /lib/IR/Instruction.cpp | |
parent | 85d8b2bbe386bcfe669575d05b61482d7be07e5d (diff) |
Diffstat (limited to 'lib/IR/Instruction.cpp')
-rw-r--r-- | lib/IR/Instruction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/IR/Instruction.cpp b/lib/IR/Instruction.cpp index 45bb296602ca..af426387be79 100644 --- a/lib/IR/Instruction.cpp +++ b/lib/IR/Instruction.cpp @@ -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); } } |