[PATCH] D91183: Added GDB pretty printer for StringMap
Moritz Sichert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 12:23:11 PST 2020
MoritzS added inline comments.
================
Comment at: llvm/utils/gdb-scripts/prettyprinters.py:206-207
+ "Print a StringMap"
+
+ class _iterator:
+ def __init__(self, entry_ty, begin, end):
----------------
csigg wrote:
> 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.
You are right, I haven't even thought of that. It looks much nicer as a generator function!
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