Reinstate "Nuke the old JIT."
[oota-llvm.git] / unittests / ExecutionEngine / MCJIT / MCJITTestBase.h
index 2c1d518da4cc710885fdfa4baec4d7910e00cf21..bc44418003cf3475133dc8198771a271488915d6 100644 (file)
@@ -14,8 +14,8 @@
 //===----------------------------------------------------------------------===//
 
 
-#ifndef MCJIT_TEST_BASE_H
-#define MCJIT_TEST_BASE_H
+#ifndef LLVM_UNITTESTS_EXECUTIONENGINE_MCJIT_MCJITTESTBASE_H
+#define LLVM_UNITTESTS_EXECUTIONENGINE_MCJIT_MCJITTESTBASE_H
 
 #include "MCJITTestAPICommon.h"
 #include "llvm/Config/config.h"
@@ -302,19 +302,18 @@ protected:
     // The operating systems below are known to be incompatible with MCJIT as
     // they are copied from the test/ExecutionEngine/MCJIT/lit.local.cfg and
     // should be kept in sync.
-    UnsupportedOSs.push_back(Triple::Cygwin);
     UnsupportedOSs.push_back(Triple::Darwin);
 
     UnsupportedEnvironments.push_back(Triple::Cygnus);
   }
 
-  void createJIT(Module *M) {
+  void createJIT(std::unique_ptr<Module> M) {
 
     // Due to the EngineBuilder constructor, it is required to have a Module
     // in order to construct an ExecutionEngine (i.e. MCJIT)
     assert(M != 0 && "a non-null Module must be provided to create MCJIT");
 
-    EngineBuilder EB(M);
+    EngineBuilder EB(std::move(M));
     std::string Error;
     TheJIT.reset(EB.setEngineKind(EngineKind::JIT)
                  .setMCJITMemoryManager(MM)
@@ -343,4 +342,4 @@ protected:
 
 } // namespace llvm
 
-#endif // MCJIT_TEST_H
+#endif