diff options
| author | Owen Anderson <resistor@mac.com> | 2010-09-16 00:27:35 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2010-09-16 00:27:35 +0000 |
| commit | 8dc0b041062f4eeacad4655a976e05a430706d19 (patch) | |
| tree | 53c36f2f949b7395c678c7481bab026e25e2a272 | |
| parent | b60e70f96363fab9412a6facdd06856418fd943a (diff) | |
| download | bcm5719-llvm-8dc0b041062f4eeacad4655a976e05a430706d19.tar.gz bcm5719-llvm-8dc0b041062f4eeacad4655a976e05a430706d19.zip | |
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.
llvm-svn: 114046
| -rw-r--r-- | llvm/lib/VMCore/Attributes.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Attributes.cpp b/llvm/lib/VMCore/Attributes.cpp index a000aee2ab4..3422faf2730 100644 --- a/llvm/lib/VMCore/Attributes.cpp +++ b/llvm/lib/VMCore/Attributes.cpp @@ -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; |

