summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ld/llvm-ld.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/llvm-ld/llvm-ld.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/llvm-ld/llvm-ld.cpp')
-rw-r--r--llvm/tools/llvm-ld/llvm-ld.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-ld/llvm-ld.cpp b/llvm/tools/llvm-ld/llvm-ld.cpp
index 62e5f09a085..17035e2a31f 100644
--- a/llvm/tools/llvm-ld/llvm-ld.cpp
+++ b/llvm/tools/llvm-ld/llvm-ld.cpp
@@ -415,7 +415,7 @@ static void EmitShellScript(char **argv) {
// build tree to the destination file.
std::string ErrMsg;
sys::Path llvmstub = FindExecutable("llvm-stub.exe", argv[0],
- reinterpret_cast<void *>(&Optimize));
+ (void *)(intptr_t)&Optimize);
if (llvmstub.isEmpty())
PrintAndExit("Could not find llvm-stub.exe executable!");
@@ -642,7 +642,7 @@ int main(int argc, char **argv, char **envp) {
// Determine the locations of the llc and gcc programs.
sys::Path llc = FindExecutable("llc", argv[0],
- reinterpret_cast<void *>(&Optimize));
+ (void *)(intptr_t)&Optimize);
if (llc.isEmpty())
PrintAndExit("Failed to find llc");
@@ -672,7 +672,7 @@ int main(int argc, char **argv, char **envp) {
// Determine the locations of the llc and gcc programs.
sys::Path llc = FindExecutable("llc", argv[0],
- reinterpret_cast<void *>(&Optimize));
+ (void *)(intptr_t)&Optimize);
if (llc.isEmpty())
PrintAndExit("Failed to find llc");
OpenPOWER on IntegriCloud