aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lto
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lto')
-rw-r--r--tools/lto/lto.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp
index fac1a30..383da87 100644
--- a/tools/lto/lto.cpp
+++ b/tools/lto/lto.cpp
@@ -353,6 +353,8 @@ LTO::optimizeModules(const std::string &OutputFilename,
for (unsigned i = 1, e = modules.size(); i != e; ++i)
if (theLinker.LinkModules(bigOne, modules[i], errMsg))
return LTO_MODULE_MERGE_FAILURE;
+ // all modules have been handed off to the linker.
+ modules.clear();
sys::Path FinalOutputPath(FinalOutputFilename);
FinalOutputPath.eraseSuffix();