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 | 5defacc6e605f4651c6300237cef8e9bb2eb6d0e (patch) | |
tree | 083068ba3cfc6652b20e6dbe0dbcfe207cc00f6e /lib/VMCore/ConstantFold.cpp | |
parent | ed47a0409b187d5dcd2bddfd054326fc809d00ae (diff) | |
download | external_llvm-5defacc6e605f4651c6300237cef8e9bb2eb6d0e.zip external_llvm-5defacc6e605f4651c6300237cef8e9bb2eb6d0e.tar.gz external_llvm-5defacc6e605f4651c6300237cef8e9bb2eb6d0e.tar.bz2 |
Move getTrue() and getFalse() to 2.5-like APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r-- | lib/VMCore/ConstantFold.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 6e6c9b0..8b56ed3 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/lib/VMCore/ConstantFold.cpp @@ -1398,9 +1398,9 @@ Constant *llvm::ConstantFoldCompareInstruction(LLVMContext &Context, // Don't try to evaluate aliases. External weak GV can be null. if (!isa<GlobalAlias>(GV) && !GV->hasExternalWeakLinkage()) { if (pred == ICmpInst::ICMP_EQ) - return Context.getFalse(); + return ConstantInt::getFalse(Context); else if (pred == ICmpInst::ICMP_NE) - return Context.getTrue(); + return ConstantInt::getTrue(Context); } // icmp eq/ne(GV,null) -> false/true } else if (C2->isNullValue()) { @@ -1408,9 +1408,9 @@ Constant *llvm::ConstantFoldCompareInstruction(LLVMContext &Context, // Don't try to evaluate aliases. External weak GV can be null. if (!isa<GlobalAlias>(GV) && !GV->hasExternalWeakLinkage()) { if (pred == ICmpInst::ICMP_EQ) - return Context.getFalse(); + return ConstantInt::getFalse(Context); else if (pred == ICmpInst::ICMP_NE) - return Context.getTrue(); + return ConstantInt::getTrue(Context); } } @@ -1446,8 +1446,8 @@ Constant *llvm::ConstantFoldCompareInstruction(LLVMContext &Context, APFloat::cmpResult R = C1V.compare(C2V); switch (pred) { default: llvm_unreachable("Invalid FCmp Predicate"); return 0; - case FCmpInst::FCMP_FALSE: return Context.getFalse(); - case FCmpInst::FCMP_TRUE: return Context.getTrue(); + case FCmpInst::FCMP_FALSE: return ConstantInt::getFalse(Context); + case FCmpInst::FCMP_TRUE: return ConstantInt::getTrue(Context); case FCmpInst::FCMP_UNO: return ConstantInt::get(Type::Int1Ty, R==APFloat::cmpUnordered); case FCmpInst::FCMP_ORD: |