projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
740fce3
)
Take lock before removing a node from MDNodeSet.
author
Devang Patel
<dpatel@apple.com>
Wed, 9 Sep 2009 17:44:26 +0000
(17:44 +0000)
committer
Devang Patel
<dpatel@apple.com>
Wed, 9 Sep 2009 17:44:26 +0000
(17:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81356
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Metadata.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Metadata.cpp
b/lib/VMCore/Metadata.cpp
index 8e025b6d7a2cf2737f202c5c2985255a6cf18009..1163b4709ceb05eedc03caad2b092a25afe77f16 100644
(file)
--- a/
lib/VMCore/Metadata.cpp
+++ b/
lib/VMCore/Metadata.cpp
@@
-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();
}