This is an archive of the discontinued LLVM Phabricator instance.

Allow multiple calls to InitLLVM() (NFC)
ClosedPublic

Authored by mehdi_amini on Aug 20 2020, 9:31 PM.

Details

Summary

In e99dee82b0, the "out_of_memory_new_handler" was changed to be
explicitly initialized instead of relying on a global static
constructor.
However before this change, install_out_of_memory_new_handler could be
called multiple times while it asserts right now.
We can be more tolerant to calling multiple time InitLLVM without
reintroducing a global constructor for this handler.

Diff Detail

Event Timeline

mehdi_amini created this revision.Aug 20 2020, 9:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2020, 9:31 PM
mehdi_amini requested review of this revision.Aug 20 2020, 9:31 PM
MaskRay accepted this revision.Aug 20 2020, 10:20 PM

LGTM.

This revision is now accepted and ready to land.Aug 20 2020, 10:20 PM
This revision was automatically updated to reflect the committed changes.