[llvm-commits] [PATCH] Support/ELF.h extensions

Chris Lattner clattner at apple.com
Mon Jul 12 14:22:46 PDT 2010


On Jul 12, 2010, at 9:46 AM, Stephen Wilson wrote:

> Hi Chris,
> 
> Chris Lattner <clattner at apple.com> writes:
>> A few stylistic updates:
>> 
>> -  unsigned char getFileClass () const { return e_ident[4]; }
>> -  unsigned char getDataEncoding () { return e_ident[5]; }
>> +  unsigned char getFileClass () const { return e_ident[EI_CLASS]; }
>> +  unsigned char getDataEncoding () { return e_ident[EI_DATA]; }
>> 
>> Not your doing, but please don't put a space before argument lists: use getFileClass() instead of getFileClass ()
>> 
>> Likewise here:
>> 
>>   Elf64_Quarter e_shstrndx;
>> +  bool checkMagic () const {
>> +    return (memcmp (e_ident, ElfMagic, strlen (ElfMagic))) == 0;
>> +  }
>> +  unsigned char getFileClass () const { return e_ident[EI_CLASS]; }
>> +  unsigned char getDataEncoding () { return e_ident[EI_DATA]; }
>> 
> 
> OK.  There are a few additional places in the file that require this
> format fix as well.  Will apply.

Sounds good, thanks!

-Chris





More information about the llvm-commits mailing list