summaryrefslogtreecommitdiff
path: root/unittests
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
commit50be71d18262ac9f27daef14b429d8132923f1df (patch)
tree92389a4fe64f3a0698c2af2ae924b3807c7ee542 /unittests
parent2e24e19cacacd4eea346b914124ffc3acadbd72e (diff)
downloadllvm-50be71d18262ac9f27daef14b429d8132923f1df.tar.gz
llvm-50be71d18262ac9f27daef14b429d8132923f1df.tar.bz2
llvm-50be71d18262ac9f27daef14b429d8132923f1df.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-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));