diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-17 20:41:14 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-17 20:41:14 +0000 |
commit | 1afc1de4064a73efc04b91ecb2c3dda7e6bb9bef (patch) | |
tree | bbe3e14eee29672ee0006c6c55435d9e181748b9 /llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp | |
parent | 11582c59d799a651db12b47dd690a02204439ed5 (diff) | |
download | bcm5719-llvm-1afc1de4064a73efc04b91ecb2c3dda7e6bb9bef.tar.gz bcm5719-llvm-1afc1de4064a73efc04b91ecb2c3dda7e6bb9bef.zip |
Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param.
Contains some manual fixes. No functionality change intended.
llvm-svn: 273047
Diffstat (limited to 'llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp b/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp index 4af232b89f3..e6b1040d8f5 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<MemoryBufferRef> BCOrErr = findBitcodeInMemBuffer(Object); if (!BCOrErr) return false; @@ -83,7 +84,8 @@ bool ModuleSummaryIndexObjectFile::hasGlobalValueSummaryInMemBuffer( // module summary/index. ErrorOr<std::unique_ptr<ModuleSummaryIndexObjectFile>> ModuleSummaryIndexObjectFile::create( - MemoryBufferRef Object, DiagnosticHandlerFunction DiagnosticHandler) { + MemoryBufferRef Object, + const DiagnosticHandlerFunction &DiagnosticHandler) { std::unique_ptr<ModuleSummaryIndex> Index; ErrorOr<MemoryBufferRef> 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<std::unique_ptr<ModuleSummaryIndex>> llvm::getModuleSummaryIndexForFile( - StringRef Path, DiagnosticHandlerFunction DiagnosticHandler) { + StringRef Path, const DiagnosticHandlerFunction &DiagnosticHandler) { ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr = MemoryBuffer::getFileOrSTDIN(Path); std::error_code EC = FileOrErr.getError(); |