Use const& for RHS.

Use copy for LHS, because it is incremented using ++ operator.

llvm-svn: 42792
This commit is contained in:
Devang Patel 2007-10-09 17:10:59 +00:00
parent 49a44f3b52
commit eac5948348
1 changed files with 1 additions and 1 deletions
clang/CodeGen

View File

@ -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))) {