forked from OSchip/llvm-project
Use const& for RHS.
Use copy for LHS, because it is incremented using ++ operator. llvm-svn: 42792
This commit is contained in:
parent
49a44f3b52
commit
eac5948348
|
@ -365,7 +365,7 @@ void CodeGenFunction::EmitCaseStmtRange(const CaseStmt &S) {
|
||||||
llvm::ConstantInt *LV = cast<llvm::ConstantInt>(EmitScalarExpr(L));
|
llvm::ConstantInt *LV = cast<llvm::ConstantInt>(EmitScalarExpr(L));
|
||||||
llvm::ConstantInt *RV = cast<llvm::ConstantInt>(EmitScalarExpr(R));
|
llvm::ConstantInt *RV = cast<llvm::ConstantInt>(EmitScalarExpr(R));
|
||||||
llvm::APInt LHS = LV->getValue();
|
llvm::APInt LHS = LV->getValue();
|
||||||
llvm::APInt RHS = RV->getValue();
|
const llvm::APInt &RHS = RV->getValue();
|
||||||
|
|
||||||
llvm::APInt Range = RHS - LHS;
|
llvm::APInt Range = RHS - LHS;
|
||||||
if (Range.ult(llvm::APInt(Range.getBitWidth(), 64))) {
|
if (Range.ult(llvm::APInt(Range.getBitWidth(), 64))) {
|
||||||
|
|
Loading…
Reference in New Issue