[Lldb-commits] [lldb] [lldb][NativePDB] Parse global variables. (PR #114303)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 31 06:51:36 PDT 2024


================
@@ -365,18 +365,20 @@ void SymbolFileNativePDB::InitializeObject() {
 }
 
 uint32_t SymbolFileNativePDB::CalculateNumCompileUnits() {
+  if (m_cu_count)
+    return *m_cu_count;
----------------
labath wrote:

`CalculateNumCompileUnits` is wrapped by `GetNumCompileUnits`, which makes sure the computation happens only once. I think you can delete this variable and just call `GetNumCompileUnits` everywhere.

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


More information about the lldb-commits mailing list