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

Chris Lattner clattner at apple.com
Sun Sep 21 20:35:26 PDT 2008


On Sep 2, 2008, at 5:30 PM, Devang Patel wrote:
> Author: dpatel
> Date: Tue Sep  2 19:30:09 2008
> New Revision: 55683
>
> URL: http://llvm.org/viewvc/llvm-project?rev=55683&view=rev
> Log:
> Use function notes to encode attribute noinline.


> +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Sep  2 19:30:09 2008
> @@ -651,12 +651,15 @@
>     AttributeUsedGlobals.insert(Fn);
>
>   // Handle noinline Functions
> -  if (lookup_attribute ("noinline", DECL_ATTRIBUTES (FnDecl))) {
> +  if (lookup_attribute ("noinline", DECL_ATTRIBUTES (FnDecl)))
> +    Fn->setNotes(FN_NOTE_NoInline);

This should probably use something like "addNote(x)".  If it had other  
notes for some reason, you wouldn't want to clobber them all.

-Chris




More information about the llvm-commits mailing list