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

Dale Johannesen dalej at apple.com
Wed Jan 30 17:13:06 PST 2008


On Jan 30, 2008, at 5:05 PM, Devang Patel wrote:

> handle_used_attribute() sets DECL_PRESERVE_P bit, so what am I  
> missing ?

It was not set in the example in gcc.dg/tree-used.c.    I'll step  
through and figure out why, agree it looks like it ought to be.

> On Jan 30, 2008, at 5:00 PM, Dale Johannesen wrote:
>
>> Author: johannes
>> Date: Wed Jan 30 19:00:20 2008
>> New Revision: 46589
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=46589&view=rev
>> Log:
>> The 'used' attribute is not stored where llvm-convert
>> thought it was.
>>
>>
>> Modified:
>>   llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
>>
>> Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=46589&r1=46588&r2=46589&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> = 
>> =====================================================================
>> --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
>> +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Jan 30 19:00:20 2008
>> @@ -633,7 +633,7 @@
>>    Fn->setSection(TREE_STRING_POINTER(DECL_SECTION_NAME(FnDecl)));
>>
>>  // Handle used Functions
>> -  if (DECL_PRESERVE_P (FnDecl))
>> +  if (lookup_attribute ("used", DECL_ATTRIBUTES (FnDecl)))
>>    AttributeUsedGlobals.insert(Fn);
>>
>>  // Handle noinline Functions
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> -
> Devang
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list