[llvm-commits] [see] CVS: llvm/lib/Target/CBackend/Writer.cpp

Reid Spencer rspencer at reidspencer.com
Wed May 16 13:08:29 PDT 2007


John,

On Wed, 2007-05-16 at 14:50 -0500, John Criswell wrote:
> 
> Changes in directory llvm/lib/Target/CBackend:
> 
> Writer.cpp updated: 1.280.4.2 -> 1.280.4.3
> ---
> Log message:
> 
> Hack to see branch to label functions as pure and const.
> Also fixed the creation of function prototypes with extern linkage.

Does the second chunk need to be merged to mainline?

Reid.

> 
> 
> ---
> Diffs of the changes:  (+14 -4)
> 
>  Writer.cpp |   18 ++++++++++++++----
>  1 files changed, 14 insertions(+), 4 deletions(-)
> 
> 
> Index: llvm/lib/Target/CBackend/Writer.cpp
> diff -u llvm/lib/Target/CBackend/Writer.cpp:1.280.4.2 llvm/lib/Target/CBackend/Writer.cpp:1.280.4.3
> --- llvm/lib/Target/CBackend/Writer.cpp:1.280.4.2	Mon Mar 19 00:37:44 2007
> +++ llvm/lib/Target/CBackend/Writer.cpp	Wed May 16 14:49:42 2007
> @@ -1247,11 +1247,20 @@
>          Out << " __ATTRIBUTE_DTOR__";
>        
>  #if 1
> -      if ((I->getName() == "exactcheck") || (I->getName() == "exactcheck2") ||
> -         (I->getName() == "poolcheck") ||
> -         (I->getName() == "poolcheckarray") || (I->getName() == "poolcheckarray_i") ||
> -         (I->getName() == "pchk_bounds") || (I->getName() == "pchk_bounds_i")) {
> +      if ((I->getName() == "exactcheck") ||
> +          (I->getName() == "exactcheck2") ||
> +          (I->getName() == "exactcheck3"))
>          Out << " __attribute__ ((const))";
> +      if ((I->getName() == "poolcheck") ||
> +          (I->getName() == "poolcheckarray") ||
> +          (I->getName() == "poolcheckarray_i") ||
> +          (I->getName() == "getBounds") ||
> +          (I->getName() == "getBounds_i") ||
> +          (I->getName() == "getBegin") ||
> +          (I->getName() == "getEnd") ||
> +          (I->getName() == "pchk_bounds") ||
> +          (I->getName() == "pchk_bounds_i")) {
> +        Out << " __attribute__ ((pure))";
>        }
>  #endif
>        if (I->hasName() && I->getName()[0] == 1)
> @@ -1453,6 +1462,7 @@
>    bool isCStructReturn = F->getCallingConv() == CallingConv::CSRet;
>    
>    if (F->hasInternalLinkage()) Out << "static ";
> +  if (F->isExternal()) Out << "extern ";
>    if (F->hasDLLImportLinkage()) Out << "__declspec(dllimport) ";
>    if (F->hasDLLExportLinkage()) Out << "__declspec(dllexport) ";  
>    switch (F->getCallingConv()) {
> 
> 
> 
> _______________________________________________
> 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