[lld] [llvm] [DTLTO] Overlap temporary file removal (PR #209423)
Ben Dunbobbin via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 02:54:35 PDT 2026
================
@@ -625,6 +625,8 @@ constexpr const char *saveTempsValues[] = {
LinkerDriver::LinkerDriver(Ctx &ctx) : ctx(ctx) {}
+void LinkerDriver::cleanupLTO() { lto.reset(); }
----------------
bd1976bris wrote:
Great point. Thanks! I changed this to avoid relying on destruction. `lto::LTO` now has an explicit `cleanupAfterRun()` hook that defaults to a no-op, and DTLTO overrides it to drain the background deletion work. `lld` calls this hook before time-trace write/cleanup.
For non-DTLTO LTO this is just a no-op virtual call when an LTO object exists, and it does not destroy the LTO object.
https://github.com/llvm/llvm-project/pull/209423
More information about the llvm-commits
mailing list