summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2016-01-15 21:14:05 +0000
committerLang Hames <lhames@gmail.com>2016-01-15 21:14:05 +0000
commit2ba12953d2e57cbd965aa1c53535bce002e4de1e (patch)
treeed30ca3e639f8a99ae2a90d2e0d349942ee5e928 /llvm
parent8801145ad4f4da063add09a8337784a89b7ff1d0 (diff)
downloadbcm5719-llvm-2ba12953d2e57cbd965aa1c53535bce002e4de1e.tar.gz
bcm5719-llvm-2ba12953d2e57cbd965aa1c53535bce002e4de1e.zip
[Orc] Remove some reinterpret casts in debugging output.
These casts were from function pointer to data pointer type, which some compilers (including GCC) may warn about. In all cases where these casts were used the original value was still available as a TargetAddress (uint64_t), so we can just print a formatted version of that instead. llvm-svn: 257932
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h b/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
index 969b5cc2e4d..a6afd3183aa 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
@@ -191,9 +191,7 @@ private:
IntVoidFnTy Fn =
reinterpret_cast<IntVoidFnTy>(static_cast<uintptr_t>(Addr));
- DEBUG(dbgs() << " Calling "
- << reinterpret_cast<void *>(reinterpret_cast<intptr_t>(Fn))
- << "\n");
+ DEBUG(dbgs() << " Calling " << format("0x%016x", Addr) << "\n");
int Result = Fn();
DEBUG(dbgs() << " Result = " << Result << "\n");
@@ -212,7 +210,7 @@ private:
for (auto &Arg : Args)
ArgV[Idx++] = Arg.c_str();
- DEBUG(dbgs() << " Calling " << reinterpret_cast<void *>(Fn) << "\n");
+ DEBUG(dbgs() << " Calling " << format("0x%016x", Addr) << "\n");
int Result = Fn(ArgC, ArgV.get());
DEBUG(dbgs() << " Result = " << Result << "\n");
@@ -224,7 +222,7 @@ private:
VoidVoidFnTy Fn =
reinterpret_cast<VoidVoidFnTy>(static_cast<uintptr_t>(Addr));
- DEBUG(dbgs() << " Calling " << reinterpret_cast<void *>(Fn) << "\n");
+ DEBUG(dbgs() << " Calling " << format("0x%016x", Addr) << "\n");
Fn();
DEBUG(dbgs() << " Complete.\n");
@@ -375,7 +373,7 @@ private:
char *Src = reinterpret_cast<char *>(static_cast<uintptr_t>(RSrc));
DEBUG(dbgs() << " Reading " << Size << " bytes from "
- << static_cast<void *>(Src) << "\n");
+ << format("0x%016x", RSrc) << "\n");
if (auto EC = call<ReadMemResponse>(Channel))
return EC;
OpenPOWER on IntegriCloud