From 698a7e58e0732f64f0b7aabf74b5696439476f59 Mon Sep 17 00:00:00 2001 From: Yaron Keren Date: Mon, 15 Jun 2015 17:03:35 +0000 Subject: [PATCH] De-duplicate common expression, NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239736 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Instruction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/IR/Instruction.cpp b/lib/IR/Instruction.cpp index 45bb296602c..af426387be7 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); } }