aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-profdata/llvm-profdata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r--llvm/tools/llvm-profdata/llvm-profdata.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index a11fc57..da10ddc 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -594,7 +594,7 @@ adjustInstrProfile(std::unique_ptr<WriterContext> &WC,
auto checkSampleProfileHasFUnique = [&Reader]() {
for (const auto &PD : Reader->getProfiles()) {
- auto &FContext = PD.second.getContext();
+ auto &FContext = PD.first;
if (FContext.toString().find(FunctionSamples::UniqSuffix) !=
std::string::npos) {
return true;
@@ -2833,8 +2833,7 @@ static int showSampleProfile(const std::string &Filename, bool ShowCounts,
"be printed");
// TODO: parse context string to support filtering by contexts.
- FunctionSamples *FS = Reader->getSamplesFor(StringRef(ShowFunction));
- Reader->dumpFunctionProfile(FS ? *FS : FunctionSamples(), OS);
+ Reader->dumpFunctionProfile(StringRef(ShowFunction), OS);
}
if (ShowProfileSymbolList) {