[Lldb-commits] [lldb] [lldb][[DWARFDeclContext] Add function to extract qualified names as vector (PR #77349)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 9 11:18:08 PST 2024


================
@@ -68,6 +68,11 @@ class DWARFDeclContext {
 
   const char *GetQualifiedName() const;
 
+  /// Returns a vector of string, one string per entry in the fully qualified
+  /// name. For example, for the DeclContext `A::B::C`, this methods returns
+  /// `{"C", "B", "A"}`
+  llvm::SmallVector<llvm::StringRef> GetQualifiedNameAsVector() const;
----------------
clayborg wrote:

This does seem like a duplication of a `std::vector<CompilerContext>`, so I would vote to possibly switch to using `std::vector<CompilerContext>` as this is what is used for type lookups to do the matching. If anything in this name match can actually be anything, the `CompilerContext::kind` can be set to `CompilerContextKind::Any` easily. 

https://github.com/llvm/llvm-project/pull/77349


More information about the lldb-commits mailing list