diff options
author | Devang Patel <dpatel@apple.com> | 2007-10-09 17:10:59 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-10-09 17:10:59 +0000 |
commit | 00ee4e4ddc10f30ab2d675752f041c738513a3ce (patch) | |
tree | e4a3c5efaa5e60c9f212480d9b32a58d7e63d690 /CodeGen | |
parent | 80fd5f96e6805ac43aab99faabd5b4c8b19551b7 (diff) |
Use const& for RHS.
Use copy for LHS, because it is incremented using ++ operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen')
-rw-r--r-- | CodeGen/CGStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CodeGen/CGStmt.cpp b/CodeGen/CGStmt.cpp index f9d614d91c..8412ece2ed 100644 --- a/CodeGen/CGStmt.cpp +++ b/CodeGen/CGStmt.cpp @@ -365,7 +365,7 @@ void CodeGenFunction::EmitCaseStmtRange(const CaseStmt &S) { llvm::ConstantInt *LV = cast<llvm::ConstantInt>(EmitScalarExpr(L)); llvm::ConstantInt *RV = cast<llvm::ConstantInt>(EmitScalarExpr(R)); llvm::APInt LHS = LV->getValue(); - llvm::APInt RHS = RV->getValue(); + const llvm::APInt &RHS = RV->getValue(); llvm::APInt Range = RHS - LHS; if (Range.ult(llvm::APInt(Range.getBitWidth(), 64))) { |