[Orc] Teach the CompileOnDemand layer to clone aliases.
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / CompileUtils.h
index a054ca659d3311cca73ef2c772cb2eed8cd1e997..1e7d211196f57203b8693576ed2b16de980d870f 100644 (file)
@@ -21,6 +21,7 @@
 #include "llvm/Target/TargetMachine.h"
 
 namespace llvm {
+namespace orc {
 
 /// @brief Simple compile functor: Takes a single IR module and returns an
 ///        ObjectFile.
@@ -39,7 +40,6 @@ public:
     if (TM.addPassesToEmitMC(PM, Ctx, ObjStream))
       llvm_unreachable("Target does not support MC emission.");
     PM.run(M);
-    ObjStream.flush();
     std::unique_ptr<MemoryBuffer> ObjBuffer(
         new ObjectMemoryBuffer(std::move(ObjBufferSV)));
     ErrorOr<std::unique_ptr<object::ObjectFile>> Obj =
@@ -54,6 +54,8 @@ public:
 private:
   TargetMachine &TM;
 };
-}
+
+} // End namespace orc.
+} // End namespace llvm.
 
 #endif // LLVM_EXECUTIONENGINE_ORC_COMPILEUTILS_H