[PATCH] D101639: Add build_fence to OCaml bindings

Josh Berdine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 4 14:26:40 PDT 2021


jberdine added a comment.

I did a bit of hunting. The name string must be empty or else LLVMBuildFence will assert. It seems to me that

  FenceInst *CreateFence(AtomicOrdering Ordering,
                         SyncScope::ID SSID = SyncScope::System,
                         const Twine &Name = "") {
    return Insert(new FenceInst(Context, Ordering, SSID), Name);
  }

in IRBuilder.h should be

  FenceInst *CreateFence(AtomicOrdering Ordering,
                         SyncScope::ID SSID = SyncScope::System) {
    return Insert(new FenceInst(Context, Ordering, SSID));
  }

and LLVMBuildFence should not take Name as an argument.

A solution that is local to the OCaml bindings would be to just always pass the empty string, and the underlying issue in IRBuilder can be addressed separately.


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

https://reviews.llvm.org/D101639



More information about the llvm-commits mailing list