Implement the TargetMachine::getJITStubForFunction method for X86, finegrainify
namespacification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10430 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp
index e24e290..d4a8707 100644
--- a/lib/Target/X86/X86CodeEmitter.cpp
+++ b/lib/Target/X86/X86CodeEmitter.cpp
@@ -23,8 +23,7 @@
 #include "Support/Debug.h"
 #include "Support/Statistic.h"
 #include "Config/alloca.h"
-
-namespace llvm {
+using namespace llvm;
 
 namespace {
   Statistic<>
@@ -54,6 +53,12 @@
   JITResolver *TheJITResolver;
 }
 
+void *X86TargetMachine::getJITStubForFunction(Function *F,
+                                              MachineCodeEmitter &MCE) {
+  if (TheJITResolver == 0)
+    TheJITResolver = new JITResolver(MCE);
+  return (void*)TheJITResolver->getLazyResolver(F);
+}
 
 /// addFunctionReference - This method is called when we need to emit the
 /// address of a function that has not yet been emitted, so we don't know the
@@ -591,5 +596,3 @@
     break;
   }
 }
-
-} // End llvm namespace