[PATCH] D122226: [llvm-pdbutil] Move InputFile/FormatUtil/LinePrinter to the PDB library.

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 07:46:21 PDT 2022


CarlosAlbertoEnciso added a comment.





================
Comment at: llvm/include/llvm/DebugInfo/PDB/Native/InputFile.h:163
+
+template <typename CallbackT>
+Error iterateOneModule(InputFile &File, const Optional<PrintScope> &HeaderScope,
----------------
rnk wrote:
> These callbacks look like they could actually be function_refs. Can you put a // TODO comment here to de-templatify them? I don't want to block on it.
I have added a // TODO comment.


================
Comment at: llvm/lib/DebugInfo/PDB/Native/LinePrinter.cpp:33
 
+FilterOptions llvm::pdb::Filters;
+
----------------
aganea wrote:
> Not a blocker, but I'm a bit allergic to global state, especially in a lib. I wonder how much work it would be to keep this `Filters` state inside the `LinePrinter` class and pass it by reference to the `iterate*` functions. That could be done in a later patch.
I have added a // TODO comment.
After pushing this patch I will look at creating another patch to move `Filters`.


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

https://reviews.llvm.org/D122226



More information about the llvm-commits mailing list