================ @@ -293,10 +290,19 @@ struct LoweringPreparePass } /// - /// AST related - /// ----------- + /// Target / language fact source + /// ----------------------------- - clang::ASTContext *astCtx; + /// Target/LangOpts/CXXABI bundle the pass reads instead of going to a live + /// ASTContext. Set from the surrounding cc1 invocation by + /// runCIRToCIRPasses (or by the .cir input path in CIRGenAction). Always + /// non-null while the pass runs. + cir::LowerModule *lowerModule = nullptr; ---------------- bcardosolopes wrote:
"Always non-null while the pass runs" isn't enforced anywhere, and `createLoweringPreparePass()` with no arguments is still declared, which hands you exactly this null. Every use below is an unguarded deref, so that's a segfault rather than a diagnostic. You already did the right thing a few hundred lines down, swapping the `assert` on a missing `static_local_info` for an `emitError` and a bail. Same treatment here. https://github.com/llvm/llvm-project/pull/219048 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
