[cfe-commits] r70786 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp test/CodeGen/function-attributes.c

Chris Lattner clattner at apple.com
Sun May 3 11:45:48 PDT 2009


On May 3, 2009, at 11:13 AM, Eli Friedman wrote:

> Author: efriedma
> Date: Sun May  3 13:13:43 2009
> New Revision: 70786
>
> URL: http://llvm.org/viewvc/llvm-project?rev=70786&view=rev
> Log:
> PR4133: fix always_inline implementation to be consistent with gcc.

Thanks Eli, please update the comment above it though.

-Chris

>
>
>
> Modified:
>    cfe/trunk/lib/CodeGen/CodeGenModule.cpp
>    cfe/trunk/test/CodeGen/function-attributes.c
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=70786&r1=70785&r2=70786&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sun May  3 13:13:43 2009
> @@ -231,8 +231,7 @@
> static CodeGenModule::GVALinkage
> GetLinkageForFunction(const FunctionDecl *FD, const LangOptions  
> &Features) {
>   // "static" and attr(always_inline) functions get internal linkage.
> -  if (FD->getStorageClass() == FunctionDecl::Static ||
> -      FD->hasAttr<AlwaysInlineAttr>())
> +  if (FD->getStorageClass() == FunctionDecl::Static)
>     return CodeGenModule::GVA_Internal;
>
>   if (!FD->isInline())
>
> Modified: cfe/trunk/test/CodeGen/function-attributes.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/function-attributes.c?rev=70786&r1=70785&r2=70786&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/test/CodeGen/function-attributes.c (original)
> +++ cfe/trunk/test/CodeGen/function-attributes.c Sun May  3 13:13:43  
> 2009
> @@ -24,8 +24,7 @@
>
> void f7(unsigned short x) { }
>
> -// F8 is dead so it should not be emitted.
> -// RUN: not grep '@f8' %t &&
> +// RUN: grep 'define void @f8() nounwind alwaysinline' %t &&
> void __attribute__((always_inline)) f8(void) { }
>
> // RUN: grep 'call void @f9_t() noreturn' %t &&
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list