aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2009-09-04 19:27:52 +0000
committerTanya Lattner <tonic@nondot.org>2009-09-04 19:27:52 +0000
commit2335bcd63f0f5990c372c5408521bcd3120544fe (patch)
tree1c5cfc21f73084b0d68b97bcb12f6b13e19a61e0
parent61d5bb69960d1f876ba150dfc311592e172371f2 (diff)
Merge 80780 from mainline.
Opaque types didn't work if llvm_is_multithreaded(). AlwaysOpaqueTy is always NULL at this point, and it causes an assertion failure. Fix it by using the just constructed tmp instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@81030 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Type.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index 8aaee5433d..aec26ce486 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -492,7 +492,7 @@ void DerivedType::dropAllTypeUses() {
tmp = AlwaysOpaqueTy;
if (!tmp) {
tmp = OpaqueType::get(getContext());
- PATypeHolder* tmp2 = new PATypeHolder(AlwaysOpaqueTy);
+ PATypeHolder* tmp2 = new PATypeHolder(tmp);
sys::MemoryFence();
AlwaysOpaqueTy = tmp;
Holder = tmp2;