[Lldb-commits] [lldb] [LLDB][NativePDB] Add PdbAstBuilder null checks (PR #176065)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 15 10:04:26 PST 2026


================
@@ -1123,11 +1120,10 @@ Block *SymbolFileNativePDB::GetOrCreateBlock(PdbCompilandSymId block_id) {
 
 void SymbolFileNativePDB::ParseDeclsForContext(
     lldb_private::CompilerDeclContext decl_ctx) {
-  TypeSystem* ts_or_err = decl_ctx.GetTypeSystem();
-  if (!ts_or_err)
+  TypeSystem *ts = decl_ctx.GetTypeSystem();
+  if (!ts || !ts->GetNativePDBParser())
     return;
-  PdbAstBuilder* ast_builder = ts_or_err->GetNativePDBParser();
-  ast_builder->ParseDeclsForContext(decl_ctx);
+  ts->GetNativePDBParser()->ParseDeclsForContext(decl_ctx);
----------------
JDevlieghere wrote:

Unless the PR is out-of-date, it looks like there's a few more instances of this. Can you please update those as well?

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


More information about the lldb-commits mailing list