[PATCH] D101025: [llvm-dwarfdump] Fix abstract origin vars location stats calculation

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 14:15:49 PDT 2021


dblaikie added inline comments.


================
Comment at: llvm/tools/llvm-dwarfdump/Statistics.cpp:225-226
+static void
+collectStatsForDie(DWARFDie Die, std::string FnPrefix, std::string VarPrefix,
+                   uint64_t BytesInScope, uint32_t InlineDepth,
+                   StringMap<PerFunctionStats> &FnStatMap,
----------------
djtodoro wrote:
> dblaikie wrote:
> > djtodoro wrote:
> > > dblaikie wrote:
> > > > Side note: why are we passing around std::strings by value? Should these be being passed by const ref? 
> > > I think we should be using const ref instead.
> > > But it is existing code, and the change for that should be a separate commit, right?
> > oh, sure - easier to see this is untouched now that the renaming is separated, thanks!
> But I can still commit the patch for turning it into const ref, as a separate commit, right? (I guess no need to review that one)
Yep!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101025/new/

https://reviews.llvm.org/D101025



More information about the llvm-commits mailing list