[Lldb-commits] [PATCH] D114627: [lldb] add new overload for SymbolFile::FindTypes that accepts a scope

Lasse Folger via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 10 07:40:43 PST 2021


lassefolger added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2470
+      const char *qn = die.GetQualifiedName(storage);
+      if (qn && !llvm::StringRef(qn).startswith(sc))
+        return true;
----------------
werat wrote:
> `llvm::StringRef(storage)` is slightly more efficient here than `llvm::StringRef(qn)`. The latter uses strlen in the constructor to calculate the length of the source string.
I wasn't sure about the semantics of die.GetQualifiedName().
It does not document whether it's guaranteed that storage contains the results. FWIW, the current implementation does that.
I changed it to use the storage.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114627



More information about the lldb-commits mailing list