[llvm-commits] [llvm] r80780 - /llvm/trunk/lib/VMCore/Type.cpp

Tanya Lattner tonic at nondot.org
Wed Sep 2 07:32:21 PDT 2009


Chris,

Do you approve this?

-Tanya

On Sep 2, 2009, at 5:25 AM, Török Edwin wrote:

> On 2009-09-02 15:23, Torok Edwin wrote:
>> Author: edwin
>> Date: Wed Sep  2 07:23:05 2009
>> New Revision: 80780
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=80780&view=rev
>> Log:
>> 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.
>>
>> Modified:
>>    llvm/trunk/lib/VMCore/Type.cpp
>>
>> Modified: llvm/trunk/lib/VMCore/Type.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=80780&r1=80779&r2=80780&view=diff
>>
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- llvm/trunk/lib/VMCore/Type.cpp (original)
>> +++ llvm/trunk/lib/VMCore/Type.cpp Wed Sep  2 07:23:05 2009
>> @@ -492,7 +492,7 @@
>>         tmp = AlwaysOpaqueTy;
>>         if (!tmp) {
>>           tmp = OpaqueType::get(getContext());
>> -          PATypeHolder* tmp2 = new PATypeHolder(AlwaysOpaqueTy);
>> +          PATypeHolder* tmp2 = new PATypeHolder(tmp);
>>           sys::MemoryFence();
>>           AlwaysOpaqueTy = tmp;
>>           Holder = tmp2;
>>
>
> I think this should be pulled into 2.6, since multi-threaded programs
> using LLVM would assert-fail when constructing
> opaque types otherwise.
>
> Best regards,
> --Edwin





More information about the llvm-commits mailing list