From 46b5c642b9baca354ba18f3dbb37f4020848d0f3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 6 Nov 2009 04:27:31 +0000 Subject: remove a bunch of extraneous LLVMContext arguments from various APIs, addressing PR5325. llvm-svn: 86231 --- llvm/lib/Transforms/Utils/CloneFunction.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp') diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index fd8862c9c6e..61d8b9606a5 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -322,8 +322,6 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB, /// mapping its operands through ValueMap if they are available. Constant *PruningFunctionCloner:: ConstantFoldMappedInstruction(const Instruction *I) { - LLVMContext &Context = I->getContext(); - SmallVector Ops; for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) if (Constant *Op = dyn_cast_or_null(MapValue(I->getOperand(i), @@ -334,8 +332,7 @@ ConstantFoldMappedInstruction(const Instruction *I) { if (const CmpInst *CI = dyn_cast(I)) return ConstantFoldCompareInstOperands(CI->getPredicate(), - &Ops[0], Ops.size(), - Context, TD); + &Ops[0], Ops.size(), TD); if (const LoadInst *LI = dyn_cast(I)) if (ConstantExpr *CE = dyn_cast(Ops[0])) @@ -346,7 +343,7 @@ ConstantFoldMappedInstruction(const Instruction *I) { CE); return ConstantFoldInstOperands(I->getOpcode(), I->getType(), &Ops[0], - Ops.size(), Context, TD); + Ops.size(), TD); } /// CloneAndPruneFunctionInto - This works exactly like CloneFunctionInto, -- cgit v1.2.3