[llvm-commits] [llvm-gcc-4.2] r57022 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Evan Cheng evan.cheng at apple.com
Mon Oct 6 13:06:34 PDT 2008


Thanks. It works. I've applied the patch, along with changes for  
FILTER_EXPR.

Evan

On Oct 6, 2008, at 5:37 AM, Duncan Sands wrote:

> Hi Evan,
>
>> Fix a bug in EmitCallOf which shows up only with assertion turned  
>> on. When it's processing a call argument that corresponds to  
>> eh_value or eh_select, grab the type of special variables  
>> ExceptionValue or ExceptionSelectorValue instead or it won't match  
>> the expected type.
>>
>> With assertion turned off, this bug doesn't cause any  
>> miscompilation because pointer types are *compatible*. But it's a  
>> bug anyway.
>
> I think the reason for this is while the generic code builds
> EXC_PTR_EXPR as a void*:
>
>  tree-eh.c:      x = build0 (EXC_PTR_EXPR, ptr_type_node);
>
> the objc (not obj-c++) front-end builds it as an objc_object_type:
>
>  objc-act.c:    return build0 (EXC_PTR_EXPR, objc_object_type);
>
> So the thing to do is simply bitcast to the right type in
> llvm-convert.  Based on this theory, can you please test the
> attached patch for me (the testcase doesn't compile here, even
> though I built with obj-c++ support...).
>
> Thanks,
>
> Duncan.
>
> PS: There shouldn't be any issue with FILTER_EXPR as far as I can see.
> <evan.diff>




More information about the llvm-commits mailing list