[clang] [clang-repl] Keep earlier declarations alive when an input fails (PR #218149)

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 25 10:50:36 PDT 2026


================
@@ -120,6 +120,8 @@ std::unique_ptr<llvm::Module> IncrementalAction::GenModule() {
   return nullptr;
 }
 
+void IncrementalAction::discardModule() { GenModule(); }
----------------
vgvassilev wrote:

I also think this is suboptimal -- we are forcing a module to be removed but that's only the last module. What happens if we are undoing a past module? Also we need to free the machine code produced by the jit...

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


More information about the cfe-commits mailing list