[llvm-commits] [llvm-gcc-4.2] r76175 - /llvm-gcc-4.2/trunk/gcc/llvm-abi.h

Nick Lewycky nicholas at mxc.ca
Fri Jul 17 17:53:20 PDT 2009


Duncan Sands wrote:
> Author: baldrick
> Date: Fri Jul 17 06:45:25 2009
> New Revision: 76175
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=76175&view=rev
> Log:
> Fix style.  Pointed out by Anton.
> 
> Modified:
>     llvm-gcc-4.2/trunk/gcc/llvm-abi.h
> 
> Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=76175&r1=76174&r2=76175&view=diff
> 
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Fri Jul 17 06:45:25 2009
> @@ -435,7 +435,7 @@
>      // Figure out if this field is zero bits wide, e.g. {} or [0 x int].  Do
>      // not include variable sized fields here.
>      std::vector<const Type*> Elts;
> -    if( Ty->getTypeID() == Type::VoidTyID ) {
> +    if (Ty->getTypeID() == Type::VoidTyID) {

The proper style is actually:

   if (Ty == Type::VoidTy) {

since it spares the pointer dereference. :-)

Nick

>        // Handle void explicitly as an opaque type.
>        const Type *OpTy = OpaqueType::get();
>        C.HandleScalarArgument(OpTy, type);
> 
> 
> _______________________________________________
> 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