[cfe-commits] r59887 - /cfe/trunk/lib/CodeGen/CodeGenFunction.cpp

Fariborz Jahanian fjahanian at apple.com
Sat Nov 22 14:39:26 PST 2008


This patch has broken many of the tests.

- Fariborz

On Nov 22, 2008, at 2:32 PM, Anders Carlsson wrote:

> Author: andersca
> Date: Sat Nov 22 16:32:07 2008
> New Revision: 59887
>
> URL: http://llvm.org/viewvc/llvm-project?rev=59887&view=rev
> Log:
> An expression is not foldable if it can't be fully evaluated. Fixes  
> PR3060
>
> Modified:
>    cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=59887&r1=59886&r2=59887&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Sat Nov 22 16:32:07 2008
> @@ -197,8 +197,10 @@
>
>   // FIXME: Rename and handle conversion of other evaluatable things
>   // to bool.
> -  if (!Cond->Evaluate(V, getContext()) || !V.isInt())
> -    return 0;  // Not foldable or not integer.
> +  bool isEvaluated;
> +  if (!Cond->Evaluate(V, getContext(), &isEvaluated) || !V.isInt() ||
> +      !isEvaluated)
> +    return 0;  // Not foldable, not integer or not fully evaluatable.
>
>   if (CodeGenFunction::ContainsLabel(Cond))
>     return 0;  // Contains a label.
>
>
> _______________________________________________
> 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