summaryrefslogtreecommitdiff
path: root/include/llvm/Support/MachO.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-02 19:38:14 +0000
committerChris Lattner <sabre@nondot.org>2010-02-02 19:38:14 +0000
commit45f8c095ad94888716ceff54daf2fdf2f2f668a4 (patch)
tree517937e44547d919413e1b704e5ab3053eb744e6 /include/llvm/Support/MachO.h
parent9474d550ff8d2be251792cf21f777d85e052ed5e (diff)
downloadllvm-45f8c095ad94888716ceff54daf2fdf2f2f668a4.tar.gz
llvm-45f8c095ad94888716ceff54daf2fdf2f2f668a4.tar.bz2
llvm-45f8c095ad94888716ceff54daf2fdf2f2f668a4.tar.xz
Add a new top-level MachO.h file for manifest constants, fixing
a layering violation from MC -> Target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/MachO.h')
-rw-r--r--include/llvm/Support/MachO.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/include/llvm/Support/MachO.h b/include/llvm/Support/MachO.h
new file mode 100644
index 0000000000..e6fccfc17f
--- /dev/null
+++ b/include/llvm/Support/MachO.h
@@ -0,0 +1,56 @@
+//===-- llvm/Support/MachO.h - The MachO file format ------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines manifest constants for the MachO object file format.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_SUPPORT_MACHO_H
+#define LLVM_SUPPORT_MACHO_H
+
+// NOTE: The enums in this file are intentially named to be different than those
+// in the headers in /usr/include/mach (on darwin systems) to avoid conflicts
+// with those macros.
+namespace llvm {
+ namespace MachO {
+ // Enums from <mach/machine.h>
+ enum {
+ // Capability bits used in the definition of cpu_type.
+ CPUArchMask = 0xff000000, // Mask for architecture bits
+ CPUArchABI64 = 0x01000000, // 64 bit ABI
+
+ // Constants for the cputype field.
+ CPUTypeI386 = 7,
+ CPUTypeX86_64 = CPUTypeI386 | CPUArchABI64,
+ CPUTypeARM = 12,
+ CPUTypeSPARC = 14,
+ CPUTypePowerPC = 18,
+ CPUTypePowerPC64 = CPUTypePowerPC | CPUArchABI64,
+
+
+ // Constants for the cpusubtype field.
+
+ // X86
+ CPUSubType_I386_ALL = 3,
+ CPUSubType_X86_64_ALL = 3,
+
+ // ARM
+ CPUSubType_ARM_ALL = 0,
+ CPUSubType_ARM_V4T = 5,
+ CPUSubType_ARM_V6 = 6,
+
+ // PowerPC
+ CPUSubType_POWERPC_ALL = 0,
+
+ CPUSubType_SPARC_ALL = 0
+ };
+ } // end namespace MachO
+} // end namespace llvm
+
+#endif