================
@@ -120,6 +120,17 @@ std::unique_ptr<llvm::Module> 
IncrementalAction::GenModule() {
   return nullptr;
 }
 
+void IncrementalAction::discardCurrentCodeGenModule() {
+  if (CodeGenerator *CG = getCodeGen()) {
+    if (auto *CurM = CG->GetModule()) {
+      llvm::LLVMContext &Ctx = CurM->getContext();
+      std::string Name = CurM->getName().str();
+      std::unique_ptr<llvm::Module> Dead(CG->ReleaseModule());
----------------
anutosh491 wrote:

Used the variable name `Dead` for now ! Can you use `Discarded` or something  
along those lines I think 

https://github.com/llvm/llvm-project/pull/169989
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to