#ifndef LLVM_MC_MCCODEGENINFO_H
#define LLVM_MC_MCCODEGENINFO_H
-namespace llvm {
-
- // Relocation model types.
- namespace Reloc {
- enum Model { Default, Static, PIC_, DynamicNoPIC };
- }
+#include "llvm/Support/CodeGen.h"
- // Code model types.
- namespace CodeModel {
- enum Model { Default, JITDefault, Small, Kernel, Medium, Large };
- }
+namespace llvm {
class MCCodeGenInfo {
- /// RelocationModel - Relocation model: statcic, pic, etc.
+ /// RelocationModel - Relocation model: static, pic, etc.
///
Reloc::Model RelocationModel;
///
CodeModel::Model CMModel;
+ /// OptLevel - Optimization level.
+ ///
+ CodeGenOpt::Level OptLevel;
+
public:
void InitMCCodeGenInfo(Reloc::Model RM = Reloc::Default,
- CodeModel::Model CM = CodeModel::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