- Move CodeModel from a TargetMachine global option to MCCodeGenInfo.
[oota-llvm.git] / lib / Target / MBlaze / MCTargetDesc / MBlazeMCTargetDesc.cpp
index 22ce1cb8b6caeabeab3981894a48282085e575b2..aa4399b839fe098cac487631ec11d828ee563e16 100644 (file)
@@ -75,11 +75,14 @@ extern "C" void LLVMInitializeMBlazeMCAsmInfo() {
   RegisterMCAsmInfoFn X(TheMBlazeTarget, createMCAsmInfo);
 }
 
-MCCodeGenInfo *createMBlazeMCCodeGenInfo(StringRef TT, Reloc::Model RM) {
+MCCodeGenInfo *createMBlazeMCCodeGenInfo(StringRef TT, Reloc::Model RM,
+                                         CodeModel::Model CM) {
   MCCodeGenInfo *X = new MCCodeGenInfo();
   if (RM == Reloc::Default)
-      RM = Reloc::Static;
-  X->InitMCCodeGenInfo(RM);
+    RM = Reloc::Static;
+  if (CM == CodeModel::Default)
+    CM = CodeModel::Small;
+  X->InitMCCodeGenInfo(RM, CM);
   return X;
 }