[clang] Use Constant::getAllOnesValue helper. NFCI.

Avoid -1ULL which MSVC tends to complain about
This commit is contained in:
Simon Pilgrim 2021-03-12 15:13:42 +00:00
parent 6cb7dddaf4
commit 731b3d7664
1 changed files with 1 additions and 1 deletions

View File

@ -3125,7 +3125,7 @@ void ScalarExprEmitter::EmitUndefinedBehaviorIntegerDivAndRemCheck(
llvm::Value *IntMin =
Builder.getInt(llvm::APInt::getSignedMinValue(Ty->getBitWidth()));
llvm::Value *NegOne = llvm::ConstantInt::get(Ty, -1ULL);
llvm::Value *NegOne = llvm::Constant::getAllOnesValue(Ty);
llvm::Value *LHSCmp = Builder.CreateICmpNE(Ops.LHS, IntMin);
llvm::Value *RHSCmp = Builder.CreateICmpNE(Ops.RHS, NegOne);