diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-09-02 12:23:05 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-09-02 12:23:05 +0000 |
commit | 254bb831d826e5a7295b7f271bbac77be9044d63 (patch) | |
tree | 0d8c0e62e3b2681bcbdbf2addc7ad21783619a0a | |
parent | f11e88337f6224513d2086d6968e1045dbcc9714 (diff) |
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
-rw-r--r-- | lib/VMCore/Type.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index ba190d9230..1abeffa99f 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; |