LLD: fix libCOFF calling exit() instead of return

This commit is contained in:
Andrew Kelley 2017-08-30 17:00:12 -04:00
parent eb8440441f
commit 41da9fdb69

View File

@ -1030,7 +1030,7 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
if (!Args.hasArgNoClaim(OPT_INPUT)) {
fixupExports();
createImportLibrary(/*AsLib=*/true);
exit(0);
return;
}
// Handle /delayload
@ -1172,9 +1172,6 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
// Write the result.
writeResult(&Symtab);
// Call exit to avoid calling destructors.
exit(0);
}
} // namespace coff