diff options
author | Jay Foad <jay.foad@gmail.com> | 2010-11-30 09:02:01 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2010-11-30 09:02:01 +0000 |
commit | a99793c5ea24dd3839f4925b89b1f6acfcb24604 (patch) | |
tree | 9afc172530d02af7cd75c095cf7b7fa095341182 /lib/Analysis/ValueTracking.cpp | |
parent | d872f144e2c9e19dacef9468eb0c953f9eb88bf9 (diff) |
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.cpp | 5 |
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; |