From 1afc1de4064a73efc04b91ecb2c3dda7e6bb9bef Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 17 Jun 2016 20:41:14 +0000 Subject: Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param. Contains some manual fixes. No functionality change intended. llvm-svn: 273047 --- llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp') diff --git a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp index 4af232b..e6b1040 100644 --- a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp +++ b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp @@ -70,7 +70,8 @@ ModuleSummaryIndexObjectFile::findBitcodeInMemBuffer(MemoryBufferRef Object) { // Looks for module summary index in the given memory buffer. // returns true if found, else false. bool ModuleSummaryIndexObjectFile::hasGlobalValueSummaryInMemBuffer( - MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler) { + MemoryBufferRef Object, + const DiagnosticHandlerFunction &DiagnosticHandler) { ErrorOr BCOrErr = findBitcodeInMemBuffer(Object); if (!BCOrErr) return false; @@ -83,7 +84,8 @@ bool ModuleSummaryIndexObjectFile::hasGlobalValueSummaryInMemBuffer( // module summary/index. ErrorOr> ModuleSummaryIndexObjectFile::create( - MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler) { + MemoryBufferRef Object, + const DiagnosticHandlerFunction &DiagnosticHandler) { std::unique_ptr Index; ErrorOr BCOrErr = findBitcodeInMemBuffer(Object); @@ -105,7 +107,7 @@ ModuleSummaryIndexObjectFile::create( // Parse the module summary index out of an IR file and return the summary // index object if found, or nullptr if not. ErrorOr> llvm::getModuleSummaryIndexForFile( - StringRef Path, DiagnosticHandlerFunction DiagnosticHandler) { + StringRef Path, const DiagnosticHandlerFunction &DiagnosticHandler) { ErrorOr> FileOrErr = MemoryBuffer::getFileOrSTDIN(Path); std::error_code EC = FileOrErr.getError(); -- cgit v1.1