[clang] [clang-repl] Fix module contamination after failed template instantiation (PR #204152)
Anutosh Bhat via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 16 06:37:52 PDT 2026
anutosh491 wrote:
The fix: in the error path, call `HandleTranslationUnit` to flush and discard the "partial IR", then call `GenModule` to start a fresh module for the next cell. `HandleTranslationUnit` on an error path nullifies the underlying module pointer, so `GenModule `needs to fall back to the stored `LLVMContext` rather than asking the (`null`) module for its context.
https://github.com/llvm/llvm-project/pull/204152
More information about the cfe-commits
mailing list