From 2335bcd63f0f5990c372c5408521bcd3120544fe Mon Sep 17 00:00:00 2001 From: Tanya Lattner Date: Fri, 4 Sep 2009 19:27:52 +0000 Subject: [PATCH] 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 --- lib/VMCore/Type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 8aaee5433da..aec26ce4865 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; -- 2.50.1