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

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 4 10:24:16 PST 2022


JDevlieghere added inline comments.


================
Comment at: lldb/include/lldb/Symbol/SymbolFile.h:237-239
+  // Find types in a specific scope.
+  // \param scope
+  //     Must be either the scope prefix (with leading ::) or empty
----------------



================
Comment at: lldb/include/lldb/Symbol/SymbolFile.h:241
+  virtual void
+  FindTypes(ConstString name, ConstString scope,
+            const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches,
----------------
Does the scope need to be a ConstString? These strings are kept in memory forever and we should be mindful of their use. Could this a StringRef? 


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2456
+  }
+  std::string storage;
+
----------------
Can this go into `if (has_scope) {`?


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