Initial implementation of 'fence' instruction, the new C++0x-style replacement for...
[oota-llvm.git] / include / llvm / MC / MCCodeGenInfo.h
1 //===-- llvm/MC/MCCodeGenInfo.h - Target CodeGen 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 tracks information about the target which can affect codegen,
11 // asm parsing, and asm printing. For example, relocation model.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_MC_MCCODEGENINFO_H
16 #define LLVM_MC_MCCODEGENINFO_H
17
18 namespace llvm {
19
20   // Relocation model types.
21   namespace Reloc {
22     enum Model { Default, Static, PIC_, DynamicNoPIC };
23   }
24
25   // Code model types.
26   namespace CodeModel {
27     enum Model { Default, JITDefault, Small, Kernel, Medium, Large };
28   }
29
30   class MCCodeGenInfo {
31     /// RelocationModel - Relocation model: statcic, pic, etc.
32     ///
33     Reloc::Model RelocationModel;
34
35     /// CMModel - Code model.
36     ///
37     CodeModel::Model CMModel;
38
39   public:
40     void InitMCCodeGenInfo(Reloc::Model RM = Reloc::Default,
41                            CodeModel::Model CM = CodeModel::Default);
42
43     Reloc::Model getRelocationModel() const { return RelocationModel; }
44
45     CodeModel::Model getCodeModel() const { return CMModel; }
46   };
47 } // namespace llvm
48
49 #endif