summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2013-05-10 17:58:41 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2013-05-10 17:58:41 +0000
commitb3a25fa5801160c75cc00f6fb2aef3a81adb0456 (patch)
tree72ea0ffc7010b6d23605bf911cad70cdff68a794 /llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
parentd608996610023818fb8ceb8287afa3f634736d37 (diff)
downloadbcm5719-llvm-b3a25fa5801160c75cc00f6fb2aef3a81adb0456.tar.gz
bcm5719-llvm-b3a25fa5801160c75cc00f6fb2aef3a81adb0456.zip
Fix MCJITCAPITest.cpp unit test on Windows.
MCJIT on Windows requires an explicit target triple with "-elf" appended to generate objects in ELF format. The common test framework was setting up this triple, but it wasn't passed to the C API in the test. llvm-svn: 181614
Diffstat (limited to 'llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
index d8cf6c592d3..07ea1afe1a8 100644
--- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
+++ b/llvm/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));
OpenPOWER on IntegriCloud