Skip to content

Commit

Permalink
[JITLink] Fix MSVC build error: formatv can't handle support::ulittle…
Browse files Browse the repository at this point in the history
…16_t values

The issue was reported with compiler output here: https://reviews.llvm.org/D144083#4219383
  • Loading branch information
weliveindetail committed Mar 24, 2023
1 parent 110c1b6 commit 4cb0b7c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 4cb0b7c

Please sign in to comment.