[Lldb-commits] [PATCH] D117383: [lldb] Expose std::pair children for unordered_map

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Aug 27 09:05:14 PDT 2022


kastiglione added inline comments.


================
Comment at: lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp:75-76
+         name.startswith("unordered_multimap<") ||
+         name.startswith("std::__1::unordered_map<") ||
+         name.startswith("std::__1::unordered_multimap<");
+}
----------------
JDevlieghere wrote:
> Maybe a little helper could avoid some duplication here and below. Something like: 
> 
> ```
> static bool isStdType(llvm::StringRef name, llvm::StringRef type) {
> 	return name.startswith(type) || name.startswith(llvm::Twine("std::__1::") + type);
> }
> ```
good idea. Since `startswith` doesn't accept a Twine I went with a slightly different approach, to the same effect.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117383



More information about the lldb-commits mailing list