[llvm] 21ee9e4 - [JITLink][AArch32] Remove duplicate '0x' hex prefixes from formatv strings in error messages

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 09:59:41 PDT 2023


Author: Stefan Gränitz
Date: 2023-09-13T18:59:08+02:00
New Revision: 21ee9e4b26a29527613e6a7aa4d19d48cc12c13f

URL: https://github.com/llvm/llvm-project/commit/21ee9e4b26a29527613e6a7aa4d19d48cc12c13f
DIFF: https://github.com/llvm/llvm-project/commit/21ee9e4b26a29527613e6a7aa4d19d48cc12c13f.diff

LOG: [JITLink][AArch32] Remove duplicate '0x' hex prefixes from formatv strings in error messages

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 b5ed00878cbcfaa..0e5aa77b8f4388e 100644
--- a/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
@@ -194,7 +194,7 @@ struct ArmRelocation {
 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}",
+      formatv("Invalid opcode [ {0:x4}, {1:x4} ] for relocation: {2}",
               static_cast<uint16_t>(R.Hi), static_cast<uint16_t>(R.Lo),
               G.getEdgeKindName(Kind)));
 }
@@ -202,7 +202,7 @@ Error makeUnexpectedOpcodeError(const LinkGraph &G, const ThumbRelocation &R,
 Error makeUnexpectedOpcodeError(const LinkGraph &G, const ArmRelocation &R,
                                 Edge::Kind Kind) {
   return make_error<JITLinkError>(
-      formatv("Invalid opcode [ 0x{0:x8} ] for relocation: {1}",
+      formatv("Invalid opcode {0:x8} for relocation: {1}",
               static_cast<uint32_t>(R.Wd), G.getEdgeKindName(Kind)));
 }
 


        


More information about the llvm-commits mailing list