[Lldb-commits] [lldb] [lldb] DWARFDIE: Follow DW_AT_specification when computing CompilerCo… (PR #77157)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 8 05:45:25 PST 2024


================
@@ -855,6 +855,23 @@ void Module::FindFunctions(ConstString name,
   }
 }
 
+void Module::FindFunctions(llvm::ArrayRef<CompilerContext> compiler_ctx,
+                           FunctionNameType name_type_mask,
+                           const ModuleFunctionSearchOptions &options,
+                           SymbolContextList &sc_list) {
+  if (compiler_ctx.empty() ||
+      compiler_ctx.back().kind != CompilerContextKind::Function)
+    return;
+  ConstString name = compiler_ctx.back().name;
+  CompilerDeclContext dc;
+  SymbolContextList unfiltered;
+  FindFunctions(name, dc,name_type_mask, options, unfiltered);
+  // Filter by context.
+  for (auto sc : unfiltered)
----------------
felipepiovezan wrote:

We're making copies of a pretty big class (two shared pointers, 5 pointers, one LineEntry):

```
const auto &sc
```

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


More information about the lldb-commits mailing list