[PATCH] D132747: [llvm][ADT] Overload output stream operator `<<` for `StringMapEntry` and `StringMap`.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 14:50:52 PDT 2022


dblaikie added inline comments.


================
Comment at: llvm/include/llvm/Testing/ADT/StringMap.h:26
+  if (M.empty()) {
+    return OS << "{ }";
+  }
----------------
wyt wrote:
> ymandel wrote:
> > Is there a standard representation for empty maps and, if so, is this it? 
> I'm not aware of one, imo { } seemed pretty representative of maps.
> Do you have a preference?
do we need the special case for `empty`, or can it flow out of the general case naturally?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132747



More information about the llvm-commits mailing list