[PATCH] D124317: [llvm-pdbutil] Add options to only dump symbol record at specified offset and its parents or children with spcified depth.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 14:11:36 PDT 2022


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Looks good to me, just one style comment.



================
Comment at: llvm/lib/DebugInfo/CodeView/CVSymbolVisitor.cpp:117
+      }
+    } else if (BeginOffset > SymbolOffset) {
+      CVSymbol BeginSym = *Begin;
----------------
Can you reorder the `else if` with the folllowing `else`, so that the conditions appear in the same order that they are executed? Something like:
  if (BeginOffset < SymbolOffset) {
    ... // accumulate parent offsets
  } else if (BeginOffset == SymbolOffset) {
    ... // print all parent and desired records
  } else if (BeginOffset <= SymEndOffset) {
    ... // handle child recs
  } else {
    ... // Handle parents' ends.
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124317



More information about the llvm-commits mailing list