119bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman//===-- llvm/MC/MCCodeGenInfo.h - Target CodeGen Info -----------*- C++ -*-===// 219bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// 319bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// The LLVM Compiler Infrastructure 419bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// 519bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// This file is distributed under the University of Illinois Open Source 619bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// License. See LICENSE.TXT for details. 719bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// 819bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman//===----------------------------------------------------------------------===// 919bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// 1019bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// This file tracks information about the target which can affect codegen, 1119bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// asm parsing, and asm printing. For example, relocation model. 1219bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman// 1319bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman//===----------------------------------------------------------------------===// 1419bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman 1519bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman#ifndef LLVM_MC_MCCODEGENINFO_H 1619bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman#define LLVM_MC_MCCODEGENINFO_H 1719bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman 1819bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman#include "llvm/Support/CodeGen.h" 1919bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman 2019bac1e08be200c31efd26f0f5fd144c9b3eefd3John Baumannamespace llvm { 2119bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman 2219bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman class MCCodeGenInfo { 2319bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman /// RelocationModel - Relocation model: statcic, pic, etc. 2419bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman /// 2519bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman Reloc::Model RelocationModel; 2619bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman 2719bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman /// CMModel - Code model. 2819bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman /// 2919bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman CodeModel::Model CMModel; 3019bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman 3119bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman public: 3219bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman void InitMCCodeGenInfo(Reloc::Model RM = Reloc::Default, 3319bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman CodeModel::Model CM = CodeModel::Default); 3419bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman 3519bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman Reloc::Model getRelocationModel() const { return RelocationModel; } 3619bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman 3719bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman CodeModel::Model getCodeModel() const { return CMModel; } 3819bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman }; 3919bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman} // namespace llvm 4019bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman 4119bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman#endif 42