[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;
----------------
felipepiovezan wrote:

We can express that this a virtually useless variable by inlining the ctor into the `FindFunctions` call. 
The way this is written now, readers are led to believe the variable is either used later, or that `dc` is updated by `FindFunctions`; neither are true.

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


More information about the lldb-commits mailing list