mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
Fix a threaded LLVM bug due the need for operator= on reference counted AttrListImpl's. It might
be possible to implement this very carefully to allow a lock-free implementation while still avoiding illegal interleavings, but I haven't been able to figure one out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f6a129a24b
commit
cb86def1c2
@ -195,6 +195,7 @@ AttrListPtr::AttrListPtr(const AttrListPtr &P) : AttrList(P.AttrList) {
|
||||
}
|
||||
|
||||
const AttrListPtr &AttrListPtr::operator=(const AttrListPtr &RHS) {
|
||||
sys::SmartScopedLock<true> Lock(*ALMutex);
|
||||
if (AttrList == RHS.AttrList) return *this;
|
||||
if (AttrList) AttrList->DropRef();
|
||||
AttrList = RHS.AttrList;
|
||||
|
Loading…
Reference in New Issue
Block a user