[llvm] r181614 - Fix MCJITCAPITest.cpp unit test on Windows.
Andrew Kaylor
andrew.kaylor at intel.com
Fri May 10 10:58:41 PDT 2013
Author: akaylor
Date: Fri May 10 12:58:41 2013
New Revision: 181614
URL: http://llvm.org/viewvc/llvm-project?rev=181614&view=rev
Log:
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.
Modified:
llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
Modified: llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp?rev=181614&r1=181613&r2=181614&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp Fri May 10 12:58:41 2013
@@ -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));
More information about the llvm-commits
mailing list