From c321e534022768d424cf5c5ab43f99489e55bf07 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 8 Jun 2016 19:09:22 +0000 Subject: 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 --- llvm/lib/Target/NVPTX/NVPTXUtilities.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Target/NVPTX/NVPTXUtilities.cpp') diff --git a/llvm/lib/Target/NVPTX/NVPTXUtilities.cpp b/llvm/lib/Target/NVPTX/NVPTXUtilities.cpp index 578b466568a..835e4b44203 100644 --- a/llvm/lib/Target/NVPTX/NVPTXUtilities.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXUtilities.cpp @@ -99,7 +99,7 @@ static void cacheAnnotationFromMD(const Module *m, const GlobalValue *gv) { } } -bool llvm::findOneNVVMAnnotation(const GlobalValue *gv, std::string prop, +bool llvm::findOneNVVMAnnotation(const GlobalValue *gv, const std::string &prop, unsigned &retval) { MutexGuard Guard(Lock); const Module *m = gv->getParent(); @@ -113,7 +113,7 @@ bool llvm::findOneNVVMAnnotation(const GlobalValue *gv, std::string prop, return true; } -bool llvm::findAllNVVMAnnotation(const GlobalValue *gv, std::string prop, +bool llvm::findAllNVVMAnnotation(const GlobalValue *gv, const std::string &prop, std::vector &retval) { MutexGuard Guard(Lock); const Module *m = gv->getParent(); -- cgit v1.2.3