Expose the fence instruction via the C API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195173 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Filip Pizlo
2013-11-20 00:07:49 +00:00
parent 3da011f561
commit d54beffaa3
3 changed files with 30 additions and 18 deletions

View File

@@ -915,8 +915,9 @@ public:
return SI;
}
FenceInst *CreateFence(AtomicOrdering Ordering,
SynchronizationScope SynchScope = CrossThread) {
return Insert(new FenceInst(Context, Ordering, SynchScope));
SynchronizationScope SynchScope = CrossThread,
const Twine &Name = "") {
return Insert(new FenceInst(Context, Ordering, SynchScope), Name);
}
AtomicCmpXchgInst *CreateAtomicCmpXchg(Value *Ptr, Value *Cmp, Value *New,
AtomicOrdering Ordering,