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

Chris Lattner clattner at apple.com
Wed Sep 2 09:13:40 PDT 2009


On Sep 2, 2009, at 7:32 AM, Tanya Lattner wrote:

> Chris,
>
> Do you approve this?

Yes, I do.  Thanks.

-Chris

>
> -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