[PATCH] D48104: [lld] add ability to register exit handlers

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 12 15:50:21 PDT 2018


inglorion created this revision.
inglorion added reviewers: ruiu, pcc, rnk.
Herald added subscribers: aheejin, arichardson, sbc100, mgorny, emaste.
Herald added a reviewer: espindola.

We have an exitLld() function that can be used to exit lld without
running the normal atexit() handlers, destructors, etc. In some cases,
there is still some code we need to run when lld exits. This patch
adds an addLldExitHandler() function which allows the registration
of handlers which will be run by exitLld(). It also moves exitLld()
into its own file.


https://reviews.llvm.org/D48104

Files:
  lld/COFF/Driver.cpp
  lld/Common/CMakeLists.txt
  lld/Common/ErrorHandler.cpp
  lld/Common/Exit.cpp
  lld/ELF/Driver.cpp
  lld/include/lld/Common/ErrorHandler.h
  lld/include/lld/Common/Exit.h
  lld/lib/Driver/DarwinLdDriver.cpp
  lld/wasm/Driver.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48104.151054.patch
Type: text/x-patch
Size: 6286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180612/5eb13eea/attachment.bin>


More information about the llvm-commits mailing list