================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to