PR4662: Fix a crash introduced by the recent LLVMContext changes.

llvm-svn: 77716
diff --git a/llvm/lib/Transforms/Scalar/TailDuplication.cpp b/llvm/lib/Transforms/Scalar/TailDuplication.cpp
index dccc3e6..5e54a69 100644
--- a/llvm/lib/Transforms/Scalar/TailDuplication.cpp
+++ b/llvm/lib/Transforms/Scalar/TailDuplication.cpp
@@ -360,7 +360,8 @@
       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();
       }