[PATCH] D155093: [DWARF] Fix undefined behaviour in dwarf type printer
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 14 12:54:47 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd3c304fd637f: [DWARF] Fix undefined behaviour in dwarf type printer (authored by momo5502, committed by efriedma).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155093/new/
https://reviews.llvm.org/D155093
Files:
llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
Index: llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
===================================================================
--- llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
+++ llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
@@ -424,11 +424,11 @@
OS << (char)Val;
OS << "'";
} else if (Val < 256)
- OS << to_string(llvm::format("'\\x%02x'", Val));
+ OS << llvm::format("'\\x%02" PRIx64 "'", Val);
else if (Val <= 0xFFFF)
- OS << to_string(llvm::format("'\\u%04x'", Val));
+ OS << llvm::format("'\\u%04" PRIx64 "'", Val);
else
- OS << to_string(llvm::format("'\\U%08x'", Val));
+ OS << llvm::format("'\\U%08" PRIx64 "'", Val);
}
}
continue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155093.540541.patch
Type: text/x-patch
Size: 784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230714/e8da8019/attachment.bin>
More information about the llvm-commits
mailing list