From 41da9fdb69065082f57c604b12eb02ca166cb18d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 30 Aug 2017 17:00:12 -0400 Subject: [PATCH] LLD: fix libCOFF calling exit() instead of return --- deps/lld/COFF/Driver.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deps/lld/COFF/Driver.cpp b/deps/lld/COFF/Driver.cpp index 854c3e6909..8bab1c1123 100644 --- a/deps/lld/COFF/Driver.cpp +++ b/deps/lld/COFF/Driver.cpp @@ -1030,7 +1030,7 @@ void LinkerDriver::link(ArrayRef ArgsArr) { if (!Args.hasArgNoClaim(OPT_INPUT)) { fixupExports(); createImportLibrary(/*AsLib=*/true); - exit(0); + return; } // Handle /delayload @@ -1172,9 +1172,6 @@ void LinkerDriver::link(ArrayRef ArgsArr) { // Write the result. writeResult(&Symtab); - - // Call exit to avoid calling destructors. - exit(0); } } // namespace coff