Remove elf specific info from ELFWriter.h to Elf.h. Code cleanup and more comments...
[oota-llvm.git] / include / llvm / Target / TargetELFWriterInfo.h
1 //===-- llvm/Target/TargetELFWriterInfo.h - ELF Writer Info -----*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the TargetELFWriterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_TARGET_TARGETELFWRITERINFO_H
15 #define LLVM_TARGET_TARGETELFWRITERINFO_H
16
17 namespace llvm {
18
19   //===--------------------------------------------------------------------===//
20   //                          TargetELFWriterInfo
21   //===--------------------------------------------------------------------===//
22
23   class TargetELFWriterInfo {
24     // EMachine - This field is the target specific value to emit as the
25     // e_machine member of the ELF header.
26     unsigned short EMachine;
27   public:
28
29     // Machine architectures
30     enum MachineType {
31       EM_NONE = 0,     // No machine
32       EM_M32 = 1,      // AT&T WE 32100
33       EM_SPARC = 2,    // SPARC
34       EM_386 = 3,      // Intel 386
35       EM_68K = 4,      // Motorola 68000
36       EM_88K = 5,      // Motorola 88000
37       EM_486 = 6,      // Intel 486 (deprecated)
38       EM_860 = 7,      // Intel 80860
39       EM_MIPS = 8,     // MIPS R3000
40       EM_PPC = 20,     // PowerPC
41       EM_ARM = 40,     // ARM
42       EM_ALPHA = 41,   // DEC Alpha
43       EM_SPARCV9 = 43, // SPARC V9
44       EM_X86_64 = 62   // AMD64
45     };
46
47     explicit TargetELFWriterInfo(MachineType machine) : EMachine(machine) {}
48     virtual ~TargetELFWriterInfo() {}
49
50     unsigned short getEMachine() const { return EMachine; }
51   };
52
53 } // end llvm namespace
54
55 #endif // LLVM_TARGET_TARGETELFWRITERINFO_H