aboutsummaryrefslogtreecommitdiff
path: root/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-10-09 17:10:59 +0000
committerDevang Patel <dpatel@apple.com>2007-10-09 17:10:59 +0000
commit00ee4e4ddc10f30ab2d675752f041c738513a3ce (patch)
treee4a3c5efaa5e60c9f212480d9b32a58d7e63d690 /CodeGen
parent80fd5f96e6805ac43aab99faabd5b4c8b19551b7 (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.cpp2
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))) {