summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-07-31 19:36:47 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-07-31 19:36:47 +0000
commitd21e55abce305c0c567c05b769e69c3cb0e2d36c (patch)
tree3d8963b838b3e50eab2f08133786d55b39513b61 /lib/Transforms
parent81acc554b9599bacf843e080dbf4c72fe88de0f7 (diff)
downloadllvm-d21e55abce305c0c567c05b769e69c3cb0e2d36c.tar.gz
llvm-d21e55abce305c0c567c05b769e69c3cb0e2d36c.tar.bz2
llvm-d21e55abce305c0c567c05b769e69c3cb0e2d36c.tar.xz
PR4662: Fix a crash introduced by the recent LLVMContext changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/TailDuplication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp
index dccc3e6ffb..5e54a69bfa 100644
--- a/lib/Transforms/Scalar/TailDuplication.cpp
+++ b/lib/Transforms/Scalar/TailDuplication.cpp
@@ -360,7 +360,8 @@ void TailDup::eliminateUnconditionalBranch(BranchInst *Branch) {
Instruction *Inst = BI++;
if (isInstructionTriviallyDead(Inst))
Inst->eraseFromParent();
- else if (Constant *C = ConstantFoldInstruction(Inst, BI->getContext())) {
+ else if (Constant *C = ConstantFoldInstruction(Inst,
+ Inst->getContext())) {
Inst->replaceAllUsesWith(C);
Inst->eraseFromParent();
}