From 3a0822f094b578157263e04114075ad7df81db41 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 21 Jun 2015 13:59:01 +0000 Subject: Vendor import of llvm trunk r240225: https://llvm.org/svn/llvm-project/llvm/trunk@240225 --- lib/IR/Instruction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/IR/Instruction.cpp') 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); } } -- cgit v1.2.3