• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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   // Relocation model types.
20   namespace Reloc {
21     enum Model { Default, Static, PIC_, DynamicNoPIC };
22   }
23 
24   class MCCodeGenInfo {
25     /// RelocationModel - Relocation model: statcic, pic, etc.
26     ///
27     Reloc::Model RelocationModel;
28 
29   public:
30     void InitMCCodeGenInfo(Reloc::Model RM = Reloc::Default);
31 
getRelocationModel()32     Reloc::Model getRelocationModel() const { return RelocationModel; }
33   };
34 } // namespace llvm
35 
36 #endif
37