Enhance -assume-single-threaded option (SR-3945)

This commit is contained in:
Mikio Takeuchi
2017-02-17 13:46:16 +09:00
parent a99141cbc3
commit 488d531846
44 changed files with 422 additions and 207 deletions

View File

@@ -161,7 +161,8 @@ bool ReleaseDevirtualizer::createDeallocCall(SILType AllocType,
// Do what a release would do before calling the deallocator: set the object
// in deallocating state, which means set the RC_DEALLOCATING_FLAG flag.
B.createSetDeallocating(ReleaseInst->getLoc(), object, Atomicity::Atomic);
B.createSetDeallocating(ReleaseInst->getLoc(), object,
cast<RefCountingInst>(ReleaseInst)->getAtomicity());
// Create the call to the destructor with the allocated object as self
// argument.