HomePhabricator

[OCaml] Handle nullptr in Llvm.global_initializer

Authored by hiraditya on Sep 30 2019, 8:45 PM.

Description

[OCaml] Handle nullptr in Llvm.global_initializer

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.

Differential Revision: https://reviews.llvm.org/D65195
Reviewed by: whitequark
Authored by: kren1

llvm-svn: 373299

Details

Committed
hiradityaSep 30 2019, 8:45 PM
Reviewer
whitequark
Differential Revision
D65195: [OCaml] Handle nullptr in Llvm.global_initializer
Parents
rGfdea5e02ce59: AMDGPU/GlobalISel: Select s1 src G_SITOFP/G_UITOFP
Branches
Unknown
Tags
Unknown