summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-profdata/llvm-profdata.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-06-17 20:41:14 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-06-17 20:41:14 +0000
commit1afc1de4064a73efc04b91ecb2c3dda7e6bb9bef (patch)
treebbe3e14eee29672ee0006c6c55435d9e181748b9 /llvm/tools/llvm-profdata/llvm-profdata.cpp
parent11582c59d799a651db12b47dd690a02204439ed5 (diff)
downloadbcm5719-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/tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r--llvm/tools/llvm-profdata/llvm-profdata.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index 4d590b1503f..8e4b4c3d4ed 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -321,18 +321,19 @@ static int merge_main(int argc, const char *argv[]) {
return 0;
}
-static int showInstrProfile(std::string Filename, bool ShowCounts,
+static int showInstrProfile(const std::string &Filename, bool ShowCounts,
bool ShowIndirectCallTargets,
bool ShowDetailedSummary,
std::vector<uint32_t> DetailedSummaryCutoffs,
- bool ShowAllFunctions, std::string ShowFunction,
- bool TextFormat, raw_fd_ostream &OS) {
+ bool ShowAllFunctions,
+ const std::string &ShowFunction, bool TextFormat,
+ raw_fd_ostream &OS) {
auto ReaderOrErr = InstrProfReader::create(Filename);
- std::vector<uint32_t> Cutoffs(DetailedSummaryCutoffs);
- if (ShowDetailedSummary && DetailedSummaryCutoffs.empty()) {
+ std::vector<uint32_t> Cutoffs = std::move(DetailedSummaryCutoffs);
+ if (ShowDetailedSummary && Cutoffs.empty()) {
Cutoffs = {800000, 900000, 950000, 990000, 999000, 999900, 999990};
}
- InstrProfSummaryBuilder Builder(Cutoffs);
+ InstrProfSummaryBuilder Builder(std::move(Cutoffs));
if (Error E = ReaderOrErr.takeError())
exitWithError(std::move(E), Filename);
@@ -438,8 +439,9 @@ static int showInstrProfile(std::string Filename, bool ShowCounts,
return 0;
}
-static int showSampleProfile(std::string Filename, bool ShowCounts,
- bool ShowAllFunctions, std::string ShowFunction,
+static int showSampleProfile(const std::string &Filename, bool ShowCounts,
+ bool ShowAllFunctions,
+ const std::string &ShowFunction,
raw_fd_ostream &OS) {
using namespace sampleprof;
LLVMContext Context;
OpenPOWER on IntegriCloud