summaryrefslogtreecommitdiff
path: root/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2010-11-30 09:02:01 +0000
committerJay Foad <jay.foad@gmail.com>2010-11-30 09:02:01 +0000
commita99793c5ea24dd3839f4925b89b1f6acfcb24604 (patch)
tree9afc172530d02af7cd75c095cf7b7fa095341182 /lib/Analysis/ValueTracking.cpp
parentd872f144e2c9e19dacef9468eb0c953f9eb88bf9 (diff)
downloadllvm-a99793c5ea24dd3839f4925b89b1f6acfcb24604.tar.gz
llvm-a99793c5ea24dd3839f4925b89b1f6acfcb24604.tar.bz2
llvm-a99793c5ea24dd3839f4925b89b1f6acfcb24604.tar.xz
PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ValueTracking.cpp')
-rw-r--r--lib/Analysis/ValueTracking.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp
index 181c9b0198..9d6459d294 100644
--- a/lib/Analysis/ValueTracking.cpp
+++ b/lib/Analysis/ValueTracking.cpp
@@ -875,8 +875,9 @@ bool llvm::ComputeMultiple(Value *V, unsigned Base, Value *&Multiple,
// Turn Op0 << Op1 into Op0 * 2^Op1
APInt Op1Int = Op1CI->getValue();
uint64_t BitToSet = Op1Int.getLimitedValue(Op1Int.getBitWidth() - 1);
- Op1 = ConstantInt::get(V->getContext(),
- APInt(Op1Int.getBitWidth(), 0).set(BitToSet));
+ APInt API(Op1Int.getBitWidth(), 0);
+ API.set(BitToSet);
+ Op1 = ConstantInt::get(V->getContext(), API);
}
Value *Mul0 = NULL;