diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-31 17:39:07 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-31 17:39:07 +0000 |
commit | 23a204d91b9a6febe11e54cab7a940d8a73e4612 (patch) | |
tree | be3eb9d190e33f3a69a17f8fc01275e4a464432e /llvm/lib/Transforms/Scalar/JumpThreading.cpp | |
parent | c10132aa79fd7fed65b86288fa92abb172ce83d2 (diff) | |
download | bcm5719-llvm-23a204d91b9a6febe11e54cab7a940d8a73e4612.tar.gz bcm5719-llvm-23a204d91b9a6febe11e54cab7a940d8a73e4612.zip |
Move getTrue() and getFalse() to 2.5-like APIs.
llvm-svn: 77685
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index 5cdd0947ab7..6125f8b9391 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -718,7 +718,8 @@ bool JumpThreading::ProcessJumpOnPHI(PHINode *PN) { // Next, figure out which successor we are threading to. BasicBlock *SuccBB; if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) - SuccBB = BI->getSuccessor(PredCst == PredBB->getContext().getFalse()); + SuccBB = BI->getSuccessor(PredCst == + ConstantInt::getFalse(PredBB->getContext())); else { SwitchInst *SI = cast<SwitchInst>(BB->getTerminator()); SuccBB = SI->getSuccessor(SI->findCaseValue(PredCst)); @@ -803,7 +804,7 @@ static Constant *GetResultOfComparison(CmpInst::Predicate pred, if (LHS == RHS) if (isa<IntegerType>(LHS->getType()) || isa<PointerType>(LHS->getType())) return ICmpInst::isTrueWhenEqual(pred) ? - Context.getTrue() : Context.getFalse(); + ConstantInt::getTrue(Context) : ConstantInt::getFalse(Context); return 0; } |