[llvm] 4cb0b7c - [JITLink] Fix MSVC build error: formatv can't handle support::ulittle16_t values
Stefan Gränitz via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 12:54:42 PDT 2023
Author: Stefan Gränitz
Date: 2023-03-24T20:53:27+01:00
New Revision: 4cb0b7ce3b4987446264312d582dac9c9a98a488
URL: https://github.com/llvm/llvm-project/commit/4cb0b7ce3b4987446264312d582dac9c9a98a488
DIFF: https://github.com/llvm/llvm-project/commit/4cb0b7ce3b4987446264312d582dac9c9a98a488.diff
LOG: [JITLink] Fix MSVC build error: formatv can't handle support::ulittle16_t values
The issue was reported with compiler output here: https://reviews.llvm.org/D144083#4219383
Added:
Modified:
llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp b/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
index 6f49a4578cf7c..9f22ad5ea303a 100644
--- a/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
@@ -157,8 +157,9 @@ struct ThumbRelocation {
Error makeUnexpectedOpcodeError(const LinkGraph &G, const ThumbRelocation &R,
Edge::Kind Kind) {
return make_error<JITLinkError>(
- formatv("Invalid opcode [ 0x{0:x4}, 0x{1:x4} ] for relocation: {2}", R.Hi,
- R.Lo, G.getEdgeKindName(Kind)));
+ formatv("Invalid opcode [ 0x{0:x4}, 0x{1:x4} ] for relocation: {2}",
+ static_cast<uint16_t>(R.Hi), static_cast<uint16_t>(R.Lo),
+ G.getEdgeKindName(Kind)));
}
template <EdgeKind_aarch32 Kind> bool checkOpcode(const ThumbRelocation &R) {
More information about the llvm-commits
mailing list