diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-05 22:41:43 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-05 22:41:43 +0000 |
| commit | e70b637033a74963187ad115795e9c575baaa415 (patch) | |
| tree | a1e2bd702fdfabdde98c47dced231fece7ccdb31 /llvm/lib/Transforms/Utils/LowerSwitch.cpp | |
| parent | d687b0380c145ad5ec6b8205e92c41e5d914e26a (diff) | |
| download | bcm5719-llvm-e70b637033a74963187ad115795e9c575baaa415.tar.gz bcm5719-llvm-e70b637033a74963187ad115795e9c575baaa415.zip | |
More LLVMContext-ification.
llvm-svn: 74807
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSwitch.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/LowerSwitch.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp index 1da59360fc2..ed6eca6c151 100644 --- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp +++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp @@ -18,6 +18,7 @@ #include "llvm/Constants.h" #include "llvm/Function.h" #include "llvm/Instructions.h" +#include "llvm/LLVMContext.h" #include "llvm/Pass.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Debug.h" @@ -200,11 +201,11 @@ BasicBlock* LowerSwitch::newLeafBlock(CaseRange& Leaf, Value* Val, "SwitchLeaf", NewLeaf); } else { // Emit V-Lo <=u Hi-Lo - Constant* NegLo = ConstantExpr::getNeg(Leaf.Low); + Constant* NegLo = Context->getConstantExprNeg(Leaf.Low); Instruction* Add = BinaryOperator::CreateAdd(Val, NegLo, Val->getName()+".off", NewLeaf); - Constant *UpperBound = ConstantExpr::getAdd(NegLo, Leaf.High); + Constant *UpperBound = Context->getConstantExprAdd(NegLo, Leaf.High); Comp = new ICmpInst(ICmpInst::ICMP_ULE, Add, UpperBound, "SwitchLeaf", NewLeaf); } |

