================
@@ -2471,6 +2471,47 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE 
&orig_die,
   return false;
 }
 
+llvm::Error
+SymbolFileDWARF::FindAndResolveFunction(SymbolContextList &sc_list,
+                                        llvm::StringRef lookup_name) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+
+  DWARFDIE die;
+  Module::LookupInfo info(ConstString(lookup_name), 
lldb::eFunctionNameTypeFull,
----------------
Michael137 wrote:

Initially I wanted to just use the DIE ID that we encoded. We can do that for 
regular functions, because the `DWARFASTParserClang` encodes the definition DIE 
ID. But for methods (and especially constructors/destructors) the 
DWARFASTParserClang just looks at the declaration DIE. So I do the lookup here.

We could make sure to encode the definition DIE into the label and move this 
logic into the DWARFASTParserClang, but unless I'm missing something we need 
the lookup to fetch the definitions (for methods at least)

https://github.com/llvm/llvm-project/pull/148877
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to