[llvm-commits] [llvm] r108953 - /llvm/trunk/include/llvm/Support/MachO.h

Chris Lattner clattner at apple.com
Tue Jul 20 22:54:37 PDT 2010


On Jul 20, 2010, at 3:36 PM, Greg Clayton wrote:

> Author: gclayton
> Date: Tue Jul 20 17:36:00 2010
> New Revision: 108953
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=108953&view=rev
> Log:
> Added support to MachO.h for many defines and structures that are needed
> to Parse mach-o files. All defines have been renamed to not conflict with
> #defines in mach header files, all structures were left named the same but
> are in the llvm::MachO namespace.

Nice!

> +#include <stdint.h>

Please use llvm/System/DataTypes.h.  Some compilers (on windows?) don't have stdint.h.

> +      LoadCommandPreBindChecksum          = 0x00000017u, // LC_PREBIND_CKSUM
> +      LoadCommandDylibLoadWeak            = 0x80000018u, // LC_LOAD_WEAK_DYLIB
> +      LoadCommandSegment64                = 0x00000019u, // LC_SEGMENT_64

Please fit in 80 columns.
> 
> +    static inline uint8_t GET_COMM_ALIGN (uint16_t n_desc)
> +    {
> +      return (n_desc >> 8u) & 0x0fu;
> +    }
> +    
> +    static inline void SET_COMM_ALIGN (uint16_t &n_desc, uint8_t align)

No spaces before the (.

Thanks Greg!

-Chris



More information about the llvm-commits mailing list