[Orc] Rename JITCompileCallbackManagerBase to JITCompileCallbackManager.
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / CompileOnDemandLayer.h
index 07914e386ad213f311231a59e8b7eecfb5ed3613..b7ee9b5937f70bf780b4f308b481735e4f17c3b6 100644 (file)
@@ -38,7 +38,7 @@ namespace orc {
 /// of the function body from the original module. The extracted body is then
 /// compiled and executed.
 template <typename BaseLayerT,
-          typename CompileCallbackMgrT = JITCompileCallbackManagerBase,
+          typename CompileCallbackMgrT = JITCompileCallbackManager,
           typename IndirectStubsMgrT = IndirectStubsManagerBase>
 class CompileOnDemandLayer {
 private:
@@ -47,9 +47,8 @@ private:
   class LambdaMaterializer final : public ValueMaterializer {
   public:
     LambdaMaterializer(MaterializerFtor M) : M(std::move(M)) {}
-    Value* materializeValueFor(Value *V) final {
-      return M(V);
-    }
+    Value *materializeDeclFor(Value *V) final { return M(V); }
+
   private:
     MaterializerFtor M;
   };
@@ -242,7 +241,7 @@ private:
         // Create a callback, associate it with the stub for the function,
         // and set the compile action to compile the partition containing the
         // function.
-        auto CCInfo = CompileCallbackMgr.getCompileCallback(SrcM.getContext());
+        auto CCInfo = CompileCallbackMgr.getCompileCallback();
         StubInits[mangle(F.getName(), DL)] =
           std::make_pair(CCInfo.getAddress(),
                          JITSymbolBase::flagsFromGlobalValue(F));
@@ -338,7 +337,10 @@ private:
 
   static std::string mangle(StringRef Name, const DataLayout &DL) {
     std::string MangledName;
-    Mangler::getNameWithPrefix(raw_string_ostream(MangledName), Name, DL);
+    {
+      raw_string_ostream MangledNameStream(MangledName);
+      Mangler::getNameWithPrefix(MangledNameStream, Name, DL);
+    }
     return MangledName;
   }