[PATCH] D132429: [llvm-profdata][NFC] fix warning

Liao Chunyu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 19:00:58 PDT 2022


liaolucy created this revision.
liaolucy added reviewers: davidxl, kazu.
Herald added subscribers: wenlei, hiraditya.
Herald added a project: All.
liaolucy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

warning: unused variable ‘FC’


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132429

Files:
  llvm/lib/ProfileData/SampleProfReader.cpp


Index: llvm/lib/ProfileData/SampleProfReader.cpp
===================================================================
--- llvm/lib/ProfileData/SampleProfReader.cpp
+++ llvm/lib/ProfileData/SampleProfReader.cpp
@@ -138,8 +138,8 @@
   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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132429.454672.patch
Type: text/x-patch
Size: 570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220823/5b8895fa/attachment.bin>


More information about the llvm-commits mailing list