diff options
author | Owen Anderson <resistor@mac.com> | 2009-06-19 23:16:19 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-06-19 23:16:19 +0000 |
commit | 430444b10237abd37eb8157c3f84509a7d9636f8 (patch) | |
tree | bb95b125f17911c2cf3abaf7c98b0d1ccb1aa41f /include/llvm/GlobalValue.h | |
parent | 4d1c1efd800727165c12c2d186a5cb0b4f5834ab (diff) | |
download | external_llvm-430444b10237abd37eb8157c3f84509a7d9636f8.tar.gz external_llvm-430444b10237abd37eb8157c3f84509a7d9636f8.tar.bz2 external_llvm-430444b10237abd37eb8157c3f84509a7d9636f8.zip |
Fix a serious bug that would cause deadlock during abstract type refinement. The constant creation
gets involved, and we end up trying to recursively acquire a writer lock. The fix for this is slightly horrible,
and involves passing a boolean "locked" parameter around in Constants.cpp, but it's better than having locked and
unlocked versions of most of the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/GlobalValue.h')
-rw-r--r-- | include/llvm/GlobalValue.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index 3b7f67d5d0..934d082914 100644 --- a/include/llvm/GlobalValue.h +++ b/include/llvm/GlobalValue.h @@ -172,7 +172,7 @@ public: virtual bool isNullValue() const { return false; } /// Override from Constant class. - virtual void destroyConstant(); + virtual void destroyConstant(bool locked = true); /// isDeclaration - Return true if the primary definition of this global /// value is outside of the current translation unit... |