[llvm] e36a71d - [llvm-profdata][NFC] fix warning
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 22 23:09:30 PDT 2022
Author: liaochunyu
Date: 2022-08-23T14:09:19+08:00
New Revision: e36a71d87b26084d0896eea77e41662f63f3d73f
URL: https://github.com/llvm/llvm-project/commit/e36a71d87b26084d0896eea77e41662f63f3d73f
DIFF: https://github.com/llvm/llvm-project/commit/e36a71d87b26084d0896eea77e41662f63f3d73f.diff
LOG: [llvm-profdata][NFC] fix warning
warning: unused variable ‘FC’
Reviewed By: kazu
Differential Revision: https://reviews.llvm.org/D132429
Added:
Modified:
llvm/lib/ProfileData/SampleProfReader.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp
index 8a97697ffcea4..bbde8a6503682 100644
--- a/llvm/lib/ProfileData/SampleProfReader.cpp
+++ b/llvm/lib/ProfileData/SampleProfReader.cpp
@@ -138,8 +138,8 @@ void SampleProfileReader::dumpJson(raw_ostream &OS) {
sortFuncProfiles(Profiles, V);
json::OStream JOS(OS, 2);
JOS.arrayBegin();
- for (const auto &[FC, FS] : V)
- dumpFunctionProfileJson(*FS, JOS, true);
+ for (const auto &F : V)
+ dumpFunctionProfileJson(*F.second, JOS, true);
JOS.arrayEnd();
// Emit a newline character at the end as json::OStream doesn't emit one.
More information about the llvm-commits
mailing list