Permalink
Please
sign in to comment.
Browse files
Expose IRBuilder::CreateAtomicCmpXchg as LLVMBuildAtomicCmpXchg in th…
…e C API. Summary: Also expose getters and setters in the C API, so that the change can be tested. Reviewers: nhaehnle, axw, joker.eph Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18260 From: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263886 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information...
Showing
with
91 additions
and 0 deletions.
- +15 −0 include/llvm-c/Core.h
- +55 −0 lib/IR/Core.cpp
- +10 −0 test/Bindings/llvm-c/atomics.ll
- +11 −0 tools/llvm-c-test/echo.cpp
| @@ -0,0 +1,10 @@ | |||
| ; RUN: llvm-as < %s | llvm-dis > %t.orig | |||
| ; RUN: llvm-as < %s | llvm-c-test --echo > %t.echo | |||
| ; RUN: diff -w %t.orig %t.echo | |||
|
|
|||
| define i32 @main() { | |||
| %1 = alloca i32 | |||
| %2 = cmpxchg i32* %1, i32 2, i32 3 seq_cst acquire | |||
| %3 = extractvalue { i32, i1 } %2, 0 | |||
| ret i32 %3 | |||
| } | |||
0 comments on commit
e6cda0e