diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-13 01:55:34 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-13 01:55:34 +0000 |
commit | 69893a224da22cff2ef37b68f8e28c3459679837 (patch) | |
tree | e9af62fbe7874bbdce0bd5180b87ebf39170970c /include | |
parent | da2a2372c6ae715befae7f086afe769dd80814f3 (diff) | |
download | external_llvm-69893a224da22cff2ef37b68f8e28c3459679837.zip external_llvm-69893a224da22cff2ef37b68f8e28c3459679837.tar.gz external_llvm-69893a224da22cff2ef37b68f8e28c3459679837.tar.bz2 |
Some versions of gcc don't like typenames in these places.
Should fix the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Object/MachO.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/include/llvm/Object/MachO.h b/include/llvm/Object/MachO.h index 33e10ff..b3051cc 100644 --- a/include/llvm/Object/MachO.h +++ b/include/llvm/Object/MachO.h @@ -67,12 +67,18 @@ struct MachODataTypeTypedefHelperCommon { typedef MachOInt24Impl<TargetEndianness> MachOInt24; }; -#define LLVM_MACHOB_IMPORT_TYPES(E) \ +#define LLVM_MACHOB_IMPORT_TYPES_TYPENAME(E) \ typedef typename MachODataTypeTypedefHelperCommon<E>::MachOInt16 MachOInt16; \ typedef typename MachODataTypeTypedefHelperCommon<E>::MachOInt32 MachOInt32; \ typedef typename MachODataTypeTypedefHelperCommon<E>::MachOInt64 MachOInt64; \ typedef typename MachODataTypeTypedefHelperCommon<E>::MachOInt24 MachOInt24; +#define LLVM_MACHOB_IMPORT_TYPES(E) \ +typedef MachODataTypeTypedefHelperCommon<E>::MachOInt16 MachOInt16; \ +typedef MachODataTypeTypedefHelperCommon<E>::MachOInt32 MachOInt32; \ +typedef MachODataTypeTypedefHelperCommon<E>::MachOInt64 MachOInt64; \ +typedef MachODataTypeTypedefHelperCommon<E>::MachOInt24 MachOInt24; + template<class MachOT> struct MachODataTypeTypedefHelper; @@ -89,7 +95,7 @@ struct MachODataTypeTypedefHelper<MachOType<TargetEndianness, true> > { }; #define LLVM_MACHO_IMPORT_TYPES(MachOT, E, B) \ -LLVM_MACHOB_IMPORT_TYPES(E) \ +LLVM_MACHOB_IMPORT_TYPES_TYPENAME(E) \ typedef typename \ MachODataTypeTypedefHelper <MachOT<E, B> >::MachOIntPtr MachOIntPtr; @@ -104,7 +110,7 @@ namespace MachOFormat { template<endianness TargetEndianness> struct Section<MachOType<TargetEndianness, false> > { - LLVM_MACHOB_IMPORT_TYPES(TargetEndianness) + LLVM_MACHOB_IMPORT_TYPES_TYPENAME(TargetEndianness) char Name[16]; char SegmentName[16]; MachOInt32 Address; @@ -120,7 +126,7 @@ namespace MachOFormat { template<endianness TargetEndianness> struct Section<MachOType<TargetEndianness, true> > { - LLVM_MACHOB_IMPORT_TYPES(TargetEndianness) + LLVM_MACHOB_IMPORT_TYPES_TYPENAME(TargetEndianness) char Name[16]; char SegmentName[16]; MachOInt64 Address; @@ -233,7 +239,7 @@ namespace MachOFormat { template<endianness TargetEndianness> struct SymbolTableEntryBase { - LLVM_MACHOB_IMPORT_TYPES(TargetEndianness) + LLVM_MACHOB_IMPORT_TYPES_TYPENAME(TargetEndianness) MachOInt32 StringIndex; uint8_t Type; uint8_t SectionIndex; @@ -255,14 +261,14 @@ namespace MachOFormat { template<endianness TargetEndianness> struct LoadCommand { - LLVM_MACHOB_IMPORT_TYPES(TargetEndianness) + LLVM_MACHOB_IMPORT_TYPES_TYPENAME(TargetEndianness) MachOInt32 Type; MachOInt32 Size; }; template<endianness TargetEndianness> struct SymtabLoadCommand { - LLVM_MACHOB_IMPORT_TYPES(TargetEndianness) + LLVM_MACHOB_IMPORT_TYPES_TYPENAME(TargetEndianness) MachOInt32 Type; MachOInt32 Size; MachOInt32 SymbolTableOffset; @@ -292,7 +298,7 @@ namespace MachOFormat { template<endianness TargetEndianness> struct LinkeditDataLoadCommand { - LLVM_MACHOB_IMPORT_TYPES(TargetEndianness) + LLVM_MACHOB_IMPORT_TYPES_TYPENAME(TargetEndianness) MachOInt32 Type; MachOInt32 Size; MachOInt32 DataOffset; @@ -301,7 +307,7 @@ namespace MachOFormat { template<endianness TargetEndianness> struct Header { - LLVM_MACHOB_IMPORT_TYPES(TargetEndianness) + LLVM_MACHOB_IMPORT_TYPES_TYPENAME(TargetEndianness) MachOInt32 Magic; MachOInt32 CPUType; MachOInt32 CPUSubtype; |