[MCJIT] Fix a cast warning in the unit-test introduced in r243589.

Thanks to Aaron Ballman for spotting this.

llvm-svn: 243891
This commit is contained in:
Lang Hames 2015-08-03 18:03:40 +00:00
parent b4c1c28c6e
commit 1423bd05b5
1 changed files with 7 additions and 1 deletions

View File

@ -514,7 +514,13 @@ TEST_F(MCJITCAPITest, addGlobalMapping) {
buildMCJITOptions();
buildMCJITEngine();
LLVMAddGlobalMapping(Engine, MappedFn, reinterpret_cast<void*>(&localTestFunc));
union {
int (*raw)();
void *usable;
} functionPointer;
functionPointer.raw = &localTestFunc;
LLVMAddGlobalMapping(Engine, MappedFn, functionPointer.usable);
buildAndRunPasses();