First patch in the direction of splitting MachineCodeEmitter in two subclasses:
JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72631 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 522a08d..f8ae884 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -19,7 +19,7 @@
 #include "llvm/GlobalVariable.h"
 #include "llvm/Instructions.h"
 #include "llvm/ModuleProvider.h"
-#include "llvm/CodeGen/MachineCodeEmitter.h"
+#include "llvm/CodeGen/JITCodeEmitter.h"
 #include "llvm/ExecutionEngine/GenericValue.h"
 #include "llvm/CodeGen/MachineCodeInfo.h"
 #include "llvm/Target/TargetData.h"
@@ -214,8 +214,8 @@
 
   jitstate = new JITState(MP);
 
-  // Initialize MCE
-  MCE = createEmitter(*this, JMM);
+  // Initialize JCE
+  JCE = createEmitter(*this, JMM);
 
   // Add target data
   MutexGuard locked(lock);
@@ -224,7 +224,7 @@
 
   // Turn the machine code intermediate representation into bytes in memory that
   // may be executed.
-  if (TM.addPassesToEmitMachineCode(PM, *MCE, OptLevel)) {
+  if (TM.addPassesToEmitMachineCode(PM, *JCE, OptLevel)) {
     cerr << "Target does not support machine code emission!\n";
     abort();
   }
@@ -253,7 +253,7 @@
 
 JIT::~JIT() {
   delete jitstate;
-  delete MCE;
+  delete JCE;
   delete &TM;
 }
 
@@ -273,7 +273,7 @@
 
     // Turn the machine code intermediate representation into bytes in memory
     // that may be executed.
-    if (TM.addPassesToEmitMachineCode(PM, *MCE, CodeGenOpt::Default)) {
+    if (TM.addPassesToEmitMachineCode(PM, *JCE, CodeGenOpt::Default)) {
       cerr << "Target does not support machine code emission!\n";
       abort();
     }
@@ -306,7 +306,7 @@
     
     // Turn the machine code intermediate representation into bytes in memory
     // that may be executed.
-    if (TM.addPassesToEmitMachineCode(PM, *MCE, CodeGenOpt::Default)) {
+    if (TM.addPassesToEmitMachineCode(PM, *JCE, CodeGenOpt::Default)) {
       cerr << "Target does not support machine code emission!\n";
       abort();
     }
@@ -338,7 +338,7 @@
     
     // Turn the machine code intermediate representation into bytes in memory
     // that may be executed.
-    if (TM.addPassesToEmitMachineCode(PM, *MCE, CodeGenOpt::Default)) {
+    if (TM.addPassesToEmitMachineCode(PM, *JCE, CodeGenOpt::Default)) {
       cerr << "Target does not support machine code emission!\n";
       abort();
     }
@@ -654,7 +654,7 @@
         Ptr = (char*)Ptr + (MisAligned ? (A-MisAligned) : 0);
       }
     } else {
-      Ptr = MCE->allocateSpace(S, A);
+      Ptr = JCE->allocateSpace(S, A);
     }
     addGlobalMapping(GV, Ptr);
     EmitGlobalVariable(GV);