summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-08-03 18:03:40 +0000
committerLang Hames <lhames@gmail.com>2015-08-03 18:03:40 +0000
commit1423bd05b54819521e96e1d78c03572d63051bb8 (patch)
tree6bf24eaa7e10f2eaf518001db46d3525a78a1f75 /llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
parentb4c1c28c6e1b8d9b7a1c6a9e62e46bb93bd3ef40 (diff)
downloadbcm5719-llvm-1423bd05b54819521e96e1d78c03572d63051bb8.tar.gz
bcm5719-llvm-1423bd05b54819521e96e1d78c03572d63051bb8.zip
[MCJIT] Fix a cast warning in the unit-test introduced in r243589.
Thanks to Aaron Ballman for spotting this. llvm-svn: 243891
Diffstat (limited to 'llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
index 9d768d97f38..cdc52a39b5f 100644
--- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
+++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
@@ -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();
OpenPOWER on IntegriCloud