[Lldb-commits] [PATCH] D32306: Remove lock from ConstString::GetLength

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 24 17:47:04 PDT 2017


zturner added inline comments.


================
Comment at: source/Utility/ConstString.cpp:49
+      // pointer, we don't need the lock.
       const StringPoolEntryType &entry = GetStringMapEntryFromKeyData(ccstr);
       return entry.getKey().size();
----------------
Why do we even have this function which digs into the `StringMap` internals rather than just calling existing `StringMap` member functions?  Can Can we just delete `GetStringMapEntryFromKeyData` entirely and use `StringMap::find`?


Repository:
  rL LLVM

https://reviews.llvm.org/D32306





More information about the lldb-commits mailing list