mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-03 19:15:30 +00:00
Take lock before removing a node from MDNodeSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81356 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
740fce3020
commit
88cfd964a3
@ -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…
x
Reference in New Issue
Block a user