[PATCH] D64505: [Support] Move the static initializer install_out_memory_new_handler to InitLLVM

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 15:50:58 PDT 2019


rnk added a comment.

In D64505#1579577 <https://reviews.llvm.org/D64505#1579577>, @jfb wrote:

> So you're saying: maybe it's a bug if we install one but there was already one installed?


Yes. And the user can call llvm_shutdown without setting creating an `InitLLVM` object, so llvm_shutdown shouldn't assume that LLVM's new handler is in use.

So, I think this change is fine as is:

- LLVM tools want this OOM handler, and they use InitLLVM to set up crash handlers
- Users of LLVM as a library should avoid InitLLVM and set their own OOM handler if they want one


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64505/new/

https://reviews.llvm.org/D64505





More information about the llvm-commits mailing list