mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
Take lock before removing a node from MDNodeSet.
llvm-svn: 81356
This commit is contained in:
parent
2898d3cb86
commit
2cbc3ef1e9
@ -115,7 +115,11 @@ void MDNode::dropAllReferences() {
|
||||
}
|
||||
|
||||
MDNode::~MDNode() {
|
||||
getType()->getContext().pImpl->MDNodeSet.RemoveNode(this);
|
||||
{
|
||||
LLVMContextImpl *pImpl = getType()->getContext().pImpl;
|
||||
sys::SmartScopedWriter<true> Writer(pImpl->ConstantsLock);
|
||||
pImpl->MDNodeSet.RemoveNode(this);
|
||||
}
|
||||
dropAllReferences();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user