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
This commit is contained in:
Andrew Kaylor 2013-05-10 17:58:41 +00:00
parent d608996610
commit b3a25fa580
1 changed files with 2 additions and 0 deletions

View File

@ -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));