summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ToolRunner.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-05 21:03:39 +0000
committerDan Gohman <gohman@apple.com>2009-08-05 21:03:39 +0000
commit198f5e84c6a3521398f7ca62ad19bf9bd06f5a41 (patch)
treef61a0b735e4e901eb519ee8105702277cfed5248 /llvm/tools/bugpoint/ToolRunner.cpp
parente5b5d8fbb3390246de5d2110dfb7fca5f597d65c (diff)
downloadbcm5719-llvm-198f5e84c6a3521398f7ca62ad19bf9bd06f5a41.tar.gz
bcm5719-llvm-198f5e84c6a3521398f7ca62ad19bf9bd06f5a41.zip
Use (void *)(intptr_t) to cast function addresses to void*
for use with sys::Path::GetMainExecutable, to avoid warnings with -pedantic. llvm-svn: 78245
Diffstat (limited to 'llvm/tools/bugpoint/ToolRunner.cpp')
-rw-r--r--llvm/tools/bugpoint/ToolRunner.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/tools/bugpoint/ToolRunner.cpp b/llvm/tools/bugpoint/ToolRunner.cpp
index bce4d52c69d..c9efbb8c76f 100644
--- a/llvm/tools/bugpoint/ToolRunner.cpp
+++ b/llvm/tools/bugpoint/ToolRunner.cpp
@@ -232,8 +232,7 @@ AbstractInterpreter *AbstractInterpreter::createLLI(const char *Argv0,
std::string &Message,
const std::vector<std::string> *ToolArgs) {
std::string LLIPath =
- FindExecutable("lli", Argv0,
- reinterpret_cast<void *>(&createLLI)).toString();
+ FindExecutable("lli", Argv0, (void *)(intptr_t)&createLLI).toString();
if (!LLIPath.empty()) {
Message = "Found lli: " + LLIPath + "\n";
return new LLI(LLIPath, ToolArgs);
@@ -420,8 +419,7 @@ LLC *AbstractInterpreter::createLLC(const char *Argv0,
const std::vector<std::string> *Args,
const std::vector<std::string> *GCCArgs) {
std::string LLCPath =
- FindExecutable("llc", Argv0,
- reinterpret_cast<void *>(&createLLC)).toString();
+ FindExecutable("llc", Argv0, (void *)(intptr_t)&createLLC).toString();
if (LLCPath.empty()) {
Message = "Cannot find `llc' in executable directory or PATH!\n";
return 0;
@@ -507,8 +505,7 @@ int JIT::ExecuteProgram(const std::string &Bitcode,
AbstractInterpreter *AbstractInterpreter::createJIT(const char *Argv0,
std::string &Message, const std::vector<std::string> *Args) {
std::string LLIPath =
- FindExecutable("lli", Argv0,
- reinterpret_cast<void *>(&createJIT)).toString();
+ FindExecutable("lli", Argv0, (void *)(intptr_t)&createJIT).toString();
if (!LLIPath.empty()) {
Message = "Found lli: " + LLIPath + "\n";
return new JIT(LLIPath, Args);
@@ -587,8 +584,7 @@ CBE *AbstractInterpreter::createCBE(const char *Argv0,
const std::vector<std::string> *Args,
const std::vector<std::string> *GCCArgs) {
sys::Path LLCPath =
- FindExecutable("llc", Argv0,
- reinterpret_cast<void *>(&createCBE));
+ FindExecutable("llc", Argv0, (void *)(intptr_t)&createCBE);
if (LLCPath.isEmpty()) {
Message =
"Cannot find `llc' in executable directory or PATH!\n";
OpenPOWER on IntegriCloud