This is an archive of the discontinued LLVM Phabricator instance.

Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in the C API.
ClosedPublic

Authored by bnieuwenhuizen on Mar 17 2016, 6:41 PM.

Details

Summary

Also expose getters and setters in the C API, so that the change can be tested.

Diff Detail

Event Timeline

bnieuwenhuizen retitled this revision from to Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in the C API..
bnieuwenhuizen updated this object.
bnieuwenhuizen added a subscriber: llvm-commits.

Fixed a stray tab.

mehdi_amini added inline comments.Mar 18 2016, 8:40 PM
include/llvm-c/Core.h
2949

Returning a bool, I'd prefix it isXXX instead of getXXX

lib/IR/Core.cpp
2941

I'd name it so that it is explicit that it only operates on cmpxchg.
Something like: LLVMGetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst)
(same in the other API)

Did suggested name changes.

mehdi_amini accepted this revision.Mar 19 2016, 1:51 PM
mehdi_amini edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 19 2016, 1:51 PM

I would be grateful if you could commit this change.