From c94270c382320cb3fe9c4dc7bf31d56c94e9643d Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sun, 27 Sep 2009 07:38:41 +0000 Subject: Instruction::clone does not need to take an LLVMContext&. Remove that and update all the callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82889 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp') diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 82eb14f..d8f6cc1 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -24,7 +24,6 @@ #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/IntrinsicInst.h" -#include "llvm/LLVMContext.h" #include "llvm/Type.h" #include "llvm/DerivedTypes.h" #include "llvm/Analysis/Dominators.h" @@ -2303,7 +2302,6 @@ void LoopStrengthReduce::OptimizeLoopTermCond(Loop *L) { // one register value. BasicBlock *LatchBlock = L->getLoopLatch(); BasicBlock *ExitingBlock = L->getExitingBlock(); - LLVMContext &Context = LatchBlock->getContext(); if (!ExitingBlock) // Multiple exits, just look at the exit in the latch block if there is one. @@ -2394,7 +2392,7 @@ void LoopStrengthReduce::OptimizeLoopTermCond(Loop *L) { Cond->moveBefore(TermBr); } else { // Otherwise, clone the terminating condition and insert into the loopend. - Cond = cast(Cond->clone(Context)); + Cond = cast(Cond->clone()); Cond->setName(L->getHeader()->getName() + ".termcond"); LatchBlock->getInstList().insert(TermBr, Cond); -- cgit v1.1