diff options
| author | Yaron Keren <yaron.keren@gmail.com> | 2015-06-15 17:03:35 +0000 |
|---|---|---|
| committer | Yaron Keren <yaron.keren@gmail.com> | 2015-06-15 17:03:35 +0000 |
| commit | 43b4d38944965a1cedc3bfce920778242f2faefd (patch) | |
| tree | 60f2f078b935aa1c2644c797b83ca419f6b519cf | |
| parent | 6200b6d593514b42743c90fa4b811aca50e1108c (diff) | |
| download | bcm5719-llvm-43b4d38944965a1cedc3bfce920778242f2faefd.tar.gz bcm5719-llvm-43b4d38944965a1cedc3bfce920778242f2faefd.zip | |
De-duplicate common expression, NFC.
llvm-svn: 239736
| -rw-r--r-- | llvm/lib/IR/Instruction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp index 45bb296602c..af426387be7 100644 --- a/llvm/lib/IR/Instruction.cpp +++ b/llvm/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); } } |

