[Lldb-commits] [lldb] [LLDB][NativePDB] Add PdbAstBuilder null checks (PR #176065)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 14 21:41:26 PST 2026
================
@@ -1020,10 +1019,8 @@ VariableSP SymbolFileNativePDB::CreateGlobalVariable(PdbGlobalSymId var_id) {
if (auto err = ts_or_err.takeError())
return nullptr;
auto ts = *ts_or_err;
- if (!ts)
- return nullptr;
-
- ts->GetNativePDBParser()->EnsureVariable(var_id);
+ if (ts && ts->GetNativePDBParser())
+ ts->GetNativePDBParser()->EnsureVariable(var_id);
----------------
JDevlieghere wrote:
```suggestion
if (ts) {
if (PdbAstBuilder* ast_builder = ts->GetNativePDBParser())
ast_builder->EnsureVariable(var_id);
}
```
https://github.com/llvm/llvm-project/pull/176065
More information about the lldb-commits
mailing list