diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 | 
| commit | 044eb2f6afba375a914ac9d8024f8f5142bb912e (patch) | |
| tree | 1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /include/llvm/BinaryFormat/MachO.h | |
| parent | eb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff) | |
Notes
Diffstat (limited to 'include/llvm/BinaryFormat/MachO.h')
| -rw-r--r-- | include/llvm/BinaryFormat/MachO.h | 18 | 
1 files changed, 8 insertions, 10 deletions
| diff --git a/include/llvm/BinaryFormat/MachO.h b/include/llvm/BinaryFormat/MachO.h index 3529c72acd9d..060fbe162ad2 100644 --- a/include/llvm/BinaryFormat/MachO.h +++ b/include/llvm/BinaryFormat/MachO.h @@ -481,7 +481,7 @@ enum RelocationInfoType {  enum { VM_PROT_READ = 0x1, VM_PROT_WRITE = 0x2, VM_PROT_EXECUTE = 0x4 };  // Values for platform field in build_version_command. -enum { +enum PlatformType {    PLATFORM_MACOS = 1,    PLATFORM_IOS = 2,    PLATFORM_TVOS = 3, @@ -1373,19 +1373,19 @@ inline void swapStruct(fvmlib_command &C) {  // Get/Set functions from <mach-o/nlist.h> -static inline uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc) { +inline uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc) {    return (((n_desc) >> 8u) & 0xffu);  } -static inline void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal) { +inline void SET_LIBRARY_ORDINAL(uint16_t &n_desc, uint8_t ordinal) {    n_desc = (((n_desc)&0x00ff) | (((ordinal)&0xff) << 8));  } -static inline uint8_t GET_COMM_ALIGN(uint16_t n_desc) { +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) { +inline void SET_COMM_ALIGN(uint16_t &n_desc, uint8_t align) {    n_desc = ((n_desc & 0xf0ffu) | ((align & 0x0fu) << 8u));  } @@ -1449,15 +1449,13 @@ enum CPUSubTypeX86 {    CPU_SUBTYPE_X86_ARCH1 = 4,    CPU_SUBTYPE_X86_64_H = 8  }; -static inline int CPU_SUBTYPE_INTEL(int Family, int Model) { +inline int CPU_SUBTYPE_INTEL(int Family, int Model) {    return Family | (Model << 4);  } -static inline int CPU_SUBTYPE_INTEL_FAMILY(CPUSubTypeX86 ST) { +inline int CPU_SUBTYPE_INTEL_FAMILY(CPUSubTypeX86 ST) {    return ((int)ST) & 0x0f;  } -static inline int CPU_SUBTYPE_INTEL_MODEL(CPUSubTypeX86 ST) { -  return ((int)ST) >> 4; -} +inline int CPU_SUBTYPE_INTEL_MODEL(CPUSubTypeX86 ST) { return ((int)ST) >> 4; }  enum { CPU_SUBTYPE_INTEL_FAMILY_MAX = 15, CPU_SUBTYPE_INTEL_MODEL_ALL = 0 };  enum CPUSubTypeARM { | 
