Clear modules vector so that destructure does not try to
delete these modules again. Patch by Chandler Carruth.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33017
91177308-0d34-0410-b5e6-
96231b3b80d8
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();