Page MenuHomePhabricator

[llvm][ocaml] Replace deprecated C functions in OCaml bindings
ClosedPublic

Authored by alan on Oct 27 2022, 9:17 PM.

Diff Detail

Event Timeline

alan created this revision.Oct 27 2022, 9:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 27 2022, 9:17 PM
alan requested review of this revision.Oct 27 2022, 9:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 27 2022, 9:17 PM
alan edited the summary of this revision. (Show Details)Oct 27 2022, 9:19 PM
alan added a reviewer: nikic.
alan updated this revision to Diff 471393.Oct 27 2022, 9:37 PM

Replace const_element with aggregate_element

alan updated this revision to Diff 471394.Oct 27 2022, 9:41 PM

Update commit message and refine doc comment

alan retitled this revision from [llvm][ocaml] Remove or replace OCaml functions with deprecated C counterparts to [llvm][ocaml] Replace deprecated C functions in OCaml bindings.Oct 27 2022, 11:15 PM
nikic accepted this revision.Oct 28 2022, 1:32 AM

LGTM, thanks!

This revision is now accepted and ready to land.Oct 28 2022, 1:32 AM
alan added a comment.EditedOct 28 2022, 2:11 PM

I don't have commit permissions to the LLVM repo, so if you need this patch for your own patch, you can commit it yourself.

This revision was automatically updated to reflect the committed changes.
alan added inline comments.Oct 31 2022, 6:06 PM
llvm/bindings/ocaml/llvm/llvm_ocaml.c
992–993

@nikic I realized that I forgot to update this comment with the new OCaml type signature in this patch. (An lltype should be added as the first argument.) I still have that pending patch where I rewrite the bindings to not use naked pointers, and when I rebased that patch after this one was merged, I fixed the comment here to have the right OCaml type. Because that patch rewrites the bindings, I had taken the opportunity to fix a bunch of "small" mistakes that I found in the bindings (e.g. wrong OCaml type signatures in C comments). Is it okay for me to be fixing these kinds of mistakes in that big patch? Or should I make another patch to fix these small mistakes?