diff options
author | Lang Hames <lhames@gmail.com> | 2018-10-31 05:16:14 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-10-31 05:16:14 +0000 |
commit | 91449355f554bd10d38910fabb6f8b006885648e (patch) | |
tree | 7fa4ba07aea72f2e7c5af662ffbe6ce57fbfdf58 /llvm/lib/ExecutionEngine | |
parent | 86d122ec36ac8560e78ef57554ad9b03acb2f143 (diff) | |
download | bcm5719-llvm-91449355f554bd10d38910fabb6f8b006885648e.tar.gz bcm5719-llvm-91449355f554bd10d38910fabb6f8b006885648e.zip |
[ORC] Fix hex printing of uint64_t values.
A plain "%x" format string will drop the high 32-bits. Use the PRIx64 macro
instead.
llvm-svn: 345696
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/Core.cpp | 10 | ||||
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/Core.cpp b/llvm/lib/ExecutionEngine/Orc/Core.cpp index 9cbb03734ed..f99cbec6d3b 100644 --- a/llvm/lib/ExecutionEngine/Orc/Core.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Core.cpp @@ -170,7 +170,8 @@ raw_ostream &operator<<(raw_ostream &OS, const JITSymbolFlags &Flags) { } raw_ostream &operator<<(raw_ostream &OS, const JITEvaluatedSymbol &Sym) { - return OS << format("0x%016x", Sym.getAddress()) << " " << Sym.getFlags(); + return OS << format("0x%016" PRIx64, Sym.getAddress()) << " " + << Sym.getFlags(); } raw_ostream &operator<<(raw_ostream &OS, const SymbolFlagsMap::value_type &KV) { @@ -1392,9 +1393,8 @@ JITDylib::lookupImpl(std::shared_ptr<AsynchronousSymbolQuery> &Q, void JITDylib::dump(raw_ostream &OS) { ES.runSessionLocked([&, this]() { - OS << "JITDylib \"" << JITDylibName - << "\" (ES: " << format("0x%016x", reinterpret_cast<uintptr_t>(&ES)) - << "):\n" + OS << "JITDylib \"" << JITDylibName << "\" (ES: " + << format("0x%016" PRIx64, reinterpret_cast<uintptr_t>(&ES)) << "):\n" << "Search order: ["; for (auto &KV : SearchOrder) OS << " (\"" << KV.first->getName() << "\", " @@ -1405,7 +1405,7 @@ void JITDylib::dump(raw_ostream &OS) { for (auto &KV : Symbols) { OS << " \"" << *KV.first << "\": "; if (auto Addr = KV.second.getAddress()) - OS << format("0x%016x", Addr) << ", " << KV.second.getFlags(); + OS << format("0x%016" PRIx64, Addr) << ", " << KV.second.getFlags(); else OS << "<not resolved>"; if (KV.second.getFlags().isLazy() || diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp index af7fcddd53d..82000ec5b32 100644 --- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp @@ -92,7 +92,7 @@ JITTargetAddress JITCompileCallbackManager::executeCompileCallback( { raw_string_ostream ErrMsgStream(ErrMsg); ErrMsgStream << "No compile callback for trampoline at " - << format("0x%016x", TrampolineAddr); + << format("0x%016" PRIx64, TrampolineAddr); } ES.reportError( make_error<StringError>(std::move(ErrMsg), inconvertibleErrorCode())); |