[PATCH] D91183: Added GDB pretty printer for StringMap

Christian Sigg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 11:33:21 PST 2020


csigg added a comment.

Thanks!

Would it be possible to the StringMap to the existing test? (Note that the debug-info tests are not run as part of the pre-merge checks, you need to run them manually).



================
Comment at: llvm/utils/gdb-scripts/prettyprinters.py:206-207
+  "Print a StringMap"
+
+  class _iterator:
+    def __init__(self, entry_ty, begin, end):
----------------
Disclaimer: I have no Python experience.

Have you considered using a generator function? I suspect it might avoid the self.first toggle and generally make the implementation a little simpler.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91183



More information about the llvm-commits mailing list