clayborg added a comment. Looks good. Just one question about caching the calculated number of compile units.
================ Comment at: source/Symbol/SymbolFile.cpp:174-182 +uint32_t SymbolFile::GetNumCompileUnits() { + std::lock_guard<std::recursive_mutex> guard(GetModuleMutex()); + if (m_compile_units.empty()) { + // Resize our array of compile unit shared pointers -- which will each + // remain NULL until someone asks for the actual compile unit information. + m_compile_units.resize(CalculateNumCompileUnits()); + } ---------------- For symbol files without compile units we will end up calling into CalculateNumCompileUnits() many tines. Can we set a bool to indicate we have already calculated the number of compile units to avoid this? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65089/new/ https://reviews.llvm.org/D65089 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits