libswift: reimplement AssumeSingleThreaded pass

This commit is contained in:
Max Desiatov
2022-01-09 21:04:24 +00:00
parent 2b5857b0c9
commit 42e6fac1ea
10 changed files with 46 additions and 63 deletions

View File

@@ -483,6 +483,11 @@ SwiftInt StoreInst_getStoreOwnership(BridgedInstruction store) {
return (SwiftInt)castToInst<StoreInst>(store)->getOwnershipQualifier();
}
void RefCountingInst_setIsAtomic(BridgedInstruction rc, bool isAtomic) {
castToInst<RefCountingInst>(rc)->setAtomicity(
isAtomic ? RefCountingInst::Atomicity::Atomic
: RefCountingInst::Atomicity::NonAtomic);
}
//===----------------------------------------------------------------------===//
// SILBuilder