[llvm-commits] [llvm] r130926 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu May 5 09:55:39 PDT 2011


On May 5, 2011, at 9:25 AM, Eli Friedman wrote:

> Author: efriedma
> Date: Thu May  5 11:25:23 2011
> New Revision: 130926
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=130926&view=rev
> Log:
> Small syntax cleanup; we don't need to #define constants in C++.  No functionality change intended.
> 
> 
> Modified:
>    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=130926&r1=130925&r2=130926&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu May  5 11:25:23 2011
> @@ -225,9 +225,10 @@
>     "vfork",
>     "getcontext"
>   };
> -#define NUM_RETURNS_TWICE_FNS sizeof(ReturnsTwiceFns) / sizeof(const char *)
> +  static const size_t NumReturnsTwiceFns = sizeof(ReturnsTwiceFns) /
> +                                           sizeof(const char *);

Note that we have array_lengthof() in STLExtras.h.





More information about the llvm-commits mailing list