Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param.

Contains some manual fixes. No functionality change intended.

llvm-svn: 273047
This commit is contained in:
Benjamin Kramer
2016-06-17 20:41:14 +00:00
parent 11582c59d7
commit 1afc1de406
20 changed files with 79 additions and 74 deletions

View File

@@ -552,14 +552,14 @@ BitcodeDiagnosticInfo::BitcodeDiagnosticInfo(std::error_code EC,
void BitcodeDiagnosticInfo::print(DiagnosticPrinter &DP) const { DP << Msg; }
static std::error_code error(DiagnosticHandlerFunction DiagnosticHandler,
static std::error_code error(const DiagnosticHandlerFunction &DiagnosticHandler,
std::error_code EC, const Twine &Message) {
BitcodeDiagnosticInfo DI(EC, DS_Error, Message);
DiagnosticHandler(DI);
return EC;
}
static std::error_code error(DiagnosticHandlerFunction DiagnosticHandler,
static std::error_code error(const DiagnosticHandlerFunction &DiagnosticHandler,
std::error_code EC) {
return error(DiagnosticHandler, EC, EC.message());
}
@@ -6555,9 +6555,9 @@ std::string llvm::getBitcodeProducerString(MemoryBufferRef Buffer,
}
// Parse the specified bitcode buffer, returning the function info index.
ErrorOr<std::unique_ptr<ModuleSummaryIndex>>
llvm::getModuleSummaryIndex(MemoryBufferRef Buffer,
DiagnosticHandlerFunction DiagnosticHandler) {
ErrorOr<std::unique_ptr<ModuleSummaryIndex>> llvm::getModuleSummaryIndex(
MemoryBufferRef Buffer,
const DiagnosticHandlerFunction &DiagnosticHandler) {
std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(Buffer, false);
ModuleSummaryIndexBitcodeReader R(Buf.get(), DiagnosticHandler);
@@ -6576,8 +6576,9 @@ llvm::getModuleSummaryIndex(MemoryBufferRef Buffer,
}
// Check if the given bitcode buffer contains a global value summary block.
bool llvm::hasGlobalValueSummary(MemoryBufferRef Buffer,
DiagnosticHandlerFunction DiagnosticHandler) {
bool llvm::hasGlobalValueSummary(
MemoryBufferRef Buffer,
const DiagnosticHandlerFunction &DiagnosticHandler) {
std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(Buffer, false);
ModuleSummaryIndexBitcodeReader R(Buf.get(), DiagnosticHandler, true);