aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/LazyValueInfo.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-06-08 19:09:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-06-08 19:09:22 +0000
commitc321e534022768d424cf5c5ab43f99489e55bf07 (patch)
treeb8cb4306701534ee6e9ee7ea055dbc25b0c92494 /llvm/lib/Analysis/LazyValueInfo.cpp
parent19e88c1ff696313db48618d6ced7afcd5253fe35 (diff)
downloadllvm-c321e534022768d424cf5c5ab43f99489e55bf07.zip
llvm-c321e534022768d424cf5c5ab43f99489e55bf07.tar.gz
llvm-c321e534022768d424cf5c5ab43f99489e55bf07.tar.bz2
Apply most suggestions of clang-tidy's performance-unnecessary-value-param
Avoids unnecessary copies. All changes audited & pass tests with asan. No functional change intended. llvm-svn: 272190
Diffstat (limited to 'llvm/lib/Analysis/LazyValueInfo.cpp')
-rw-r--r--llvm/lib/Analysis/LazyValueInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 0414814..c856845 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -297,7 +297,7 @@ raw_ostream &operator<<(raw_ostream &OS, const LVILatticeVal &Val) {
/// Returns true if this lattice value represents at most one possible value.
/// This is as precise as any lattice value can get while still representing
/// reachable code.
-static bool hasSingleValue(LVILatticeVal Val) {
+static bool hasSingleValue(const LVILatticeVal &Val) {
if (Val.isConstantRange() &&
Val.getConstantRange().isSingleElement())
// Integer constants are single element ranges