[lld] [llvm] [DTLTO][ELF][COFF] Add archive support for DTLTO. (PR #157043)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 2 13:45:49 PST 2025


================
@@ -731,13 +734,18 @@ static void writeToResolutionFile(raw_ostream &OS, InputFile *Input,
   assert(ResI == Res.end());
 }
 
-Error LTO::add(std::unique_ptr<InputFile> Input,
+Error LTO::add(std::unique_ptr<InputFile> InputPtr,
                ArrayRef<SymbolResolution> Res) {
-  llvm::TimeTraceScope timeScope("LTO add input", Input->getName());
+  llvm::TimeTraceScope timeScope("LTO add input", InputPtr->getName());
   assert(!CalledGetMaxTasks);
 
+  Expected<InputFile *> InputOrErr = dtlto::addInput(this, std::move(InputPtr));
----------------
teresajohnson wrote:

Oh I see - I have a comment about this in addInput. But is this going to cause additional memory overhead? Currently the InputFile is going to be destructed after each call to add() afaict.

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


More information about the llvm-commits mailing list