[PATCH] D69847: DWARFDebugLoc(v4): Add an incremental parsing function
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 13:02:16 PST 2019
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.
A few nits inline, but otherwise this LGTM.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h:107
+ uint64_t *Offset,
+ function_ref<bool(const DWARFLocationEntry &)> F) const override;
+
----------------
Can we have a more meaningful name than `F`?
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:161
+ if (DumpOffset) {
+ dumpLocationList(&*DumpOffset, OS, /*BaseAddr=*/None, MRI, nullptr,
+ DumpOpts, /*Indent=*/12);
----------------
Nit: given that we have the comments in both branches, maybe it's worth having a named temporary variable?
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:181
DataExtractor::Cursor C(*Offset);
+ bool Continue = true;
+ while (Continue) {
----------------
Any reason you prefer this over while(true) with a break? Just asking out of curiosity.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69847/new/
https://reviews.llvm.org/D69847
More information about the llvm-commits
mailing list