From: Torok Edwin Date: Wed, 2 Sep 2009 12:23:05 +0000 (+0000) Subject: Opaque types didn't work if llvm_is_multithreaded(). X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=254bb831d826e5a7295b7f271bbac77be9044d63;p=oota-llvm.git 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/trunk@80780 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index ba190d92301..1abeffa99ff 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;