//===----------------------------------------------------------------------===//
-#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"
// 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)
} // namespace llvm
-#endif // MCJIT_TEST_H
+#endif