[PATCH] D31171: Improve StringMap iterator support.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 22:47:28 PDT 2017


zturner created this revision.
Herald added a subscriber: mgorny.

Make the two `StringMap` iterators support `iterator_facade_base`. This fixes some usage scenarios when passing begin and end to various STL algorithms. After doing that, it's easy to make a `StringMapKeysIterator` that only iterates keys, so I've done that as well.


https://reviews.llvm.org/D31171

Files:
  llvm/include/llvm/ADT/StringExtras.h
  llvm/include/llvm/ADT/StringMap.h
  llvm/unittests/Support/CMakeLists.txt
  llvm/unittests/Support/StringMap.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31171.92433.patch
Type: text/x-patch
Size: 7137 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170321/f8b03507/attachment.bin>


More information about the llvm-commits mailing list