X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FMC%2FMCCodeGenInfo.h;h=d1765e1240a47c536126b13e4c48e26daccacc64;hb=6312cb099734263f348f36a31b8892b1373a7076;hp=908922a253a2fe67a323bd5e70f8e35c7c4396a2;hpb=439661395fd2a2a832dba01c65bc88718528313c;p=oota-llvm.git diff --git a/include/llvm/MC/MCCodeGenInfo.h b/include/llvm/MC/MCCodeGenInfo.h index 908922a253a..d1765e1240a 100644 --- a/include/llvm/MC/MCCodeGenInfo.h +++ b/include/llvm/MC/MCCodeGenInfo.h @@ -15,21 +15,33 @@ #ifndef LLVM_MC_MCCODEGENINFO_H #define LLVM_MC_MCCODEGENINFO_H +#include "llvm/Support/CodeGen.h" + namespace llvm { - // Relocation model types. - namespace Reloc { - enum Model { Default, Static, PIC_, DynamicNoPIC }; - } class MCCodeGenInfo { - /// RelocationModel - Relocation model: statcic, pic, etc. + /// RelocationModel - Relocation model: static, pic, etc. /// Reloc::Model RelocationModel; + /// CMModel - Code model. + /// + CodeModel::Model CMModel; + + /// OptLevel - Optimization level. + /// + CodeGenOpt::Level OptLevel; + public: - void InitMCCodeGenInfo(Reloc::Model RM = Reloc::Default); + void InitMCCodeGenInfo(Reloc::Model RM = Reloc::Default, + CodeModel::Model CM = CodeModel::Default, + CodeGenOpt::Level OL = CodeGenOpt::Default); Reloc::Model getRelocationModel() const { return RelocationModel; } + + CodeModel::Model getCodeModel() const { return CMModel; } + + CodeGenOpt::Level getOptLevel() const { return OptLevel; } }; } // namespace llvm