aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
index d8cf6c592d..07ea1afe1a 100644
--- a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
+++ b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
@@ -48,6 +48,8 @@ TEST_F(MCJITCAPITest, simple_function) {
// Creates a function that returns 42, compiles it, and runs it.
LLVMModuleRef module = LLVMModuleCreateWithName("simple_module");
+
+ LLVMSetTarget(module, HostTriple.c_str());
LLVMValueRef function = LLVMAddFunction(
module, "simple_function", LLVMFunctionType(LLVMInt32Type(), 0, 0, 0));