diff options
author | Rui Ueyama <ruiu@google.com> | 2015-07-03 08:31:35 +0300 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2015-07-03 08:31:35 +0300 |
commit | a51ce71fdfa0ed77ef2657b3e5686aae1a76e185 (patch) | |
tree | 00808fcf4a031910990cba99761c53c37ebb818f /lld | |
parent | 25bb2e4709d5be7ac694d8f428d9864c5e0c48fd (diff) |
COFF: Call exit(0) on success to not call destructors.
This change cut the link time of chrome.dll from 24 seconds
to 22 seconds (5% gain). When the control reaches end of link(),
all output files have already been written. All in-memory
objects can just vanish. There is no use to call their dtors.
llvm-svn: 241320
Diffstat (limited to 'lld')
-rw-r--r-- | lld/COFF/Driver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 9006d0368660..ade0333a72c0 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -652,7 +652,8 @@ bool LinkerDriver::link(llvm::ArrayRef<const char *> ArgsArr) { } Symtab.printMap(Out); } - return true; + // Call exit to avoid calling destructors. + exit(0); } } // namespace coff |