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

Leonard Grey via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 15 10:54:17 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);
----------------
speednoisemovement wrote:

Whoops, should be all of them now!

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


More information about the lldb-commits mailing list