Page MenuHomePhabricator

[OCaml] Handle nullptr in Llvm.global_initializer
AcceptedPublic

Authored by kren1 on Jul 24 2019, 2:17 AM.

Details

Reviewers
whitequark
Summary

LLVMGetInitializer returns nullptr in case there is no
initializer. There is not much that can be done with nullptr in OCaml,
not even test if it is null. Also, there does not seem to be a C or
OCaml API to test if there is an initializer. So this diff changes
Llvm.global_initializer to return an option.

Diff Detail

Event Timeline

kren1 created this revision.Jul 24 2019, 2:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2019, 2:17 AM
This revision is now accepted and ready to land.Jul 24 2019, 11:51 AM

Thanks @whitequark . @modocache could you commit this for me?