https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/164778
None >From f55938966e63066404d282d07c3a16c759d81a53 Mon Sep 17 00:00:00 2001 From: anutosh491 <[email protected]> Date: Thu, 23 Oct 2025 14:32:13 +0530 Subject: [PATCH] Use RegisterPTU for tracking generated TranslationUnitDecl through parse --- clang/lib/Interpreter/Interpreter.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp index b05cb5a0f1dbe..cde354c9cd8d1 100644 --- a/clang/lib/Interpreter/Interpreter.cpp +++ b/clang/lib/Interpreter/Interpreter.cpp @@ -581,12 +581,7 @@ Interpreter::Parse(llvm::StringRef Code) { if (!TuOrErr) return TuOrErr.takeError(); - PTUs.emplace_back(PartialTranslationUnit()); - PartialTranslationUnit &LastPTU = PTUs.back(); - LastPTU.TUPart = *TuOrErr; - - if (std::unique_ptr<llvm::Module> M = Act->GenModule()) - LastPTU.TheModule = std::move(M); + PartialTranslationUnit &LastPTU = IncrParser->RegisterPTU(*TuOrErr); return LastPTU; } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
