[Lldb-commits] [PATCH] D56564: [SymbolFile] Make ParseCompileUnitXXX accept a CompileUnit&.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 10 15:31:16 PST 2019


clayborg added a comment.

All the change to the symbol vendor make sense, but it seems like all of the call sites should be:

  cu->GetLanguage();
  cu->ParseFunctions();
  cu->GetLineTable();
  cu->ParseDebugMacros();
  cu->GetSupportFiles();
  cu->ParseTypes();

Some of these calls might already be there, but is seems like we should initiate these calls from the CompileUnit class.



================
Comment at: lldb/source/Core/Module.cpp:373
 
-      sc.comp_unit->ForeachFunction([&sc, &symbols](const FunctionSP &f) {
-        sc.function = f.get();
-        symbols->ParseFunctionBlocks(sc);
-        // Parse the variables for this function and all its blocks
-        symbols->ParseVariablesForContext(sc);
-        return false;
-      });
+    symbols->ParseFunctions(*sc.comp_unit);
 
----------------
Seems like this should almost be:

```
sc.comp_unit->ParseAllFunctions()
```

Inside the compile unit it can pass "*this" to the symbol vendor?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56564/new/

https://reviews.llvm.org/D56564





More information about the lldb-commits mailing list