PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void.
[oota-llvm.git] / lib / Analysis / ValueTracking.cpp
index 181c9b01980c33c7bdbff2fc76064c60470bfc61..9d6459d29445d9254aafcdd4242fcf695c1cbf1e 100644 (file)
@@ -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;