a36d17730a
Fixes errors introduced by adding PRINTF_ATTRIBUTE to BaseWriteStream::Printf due to attempting to print a compiler::target::uword using the format for uword. Original description: For snapshot writing, we generally only have aligned writes so the old methods worked well, but in some formats (like DWARF) we're not guaranteed to have aligned writes and so had to use WriteBytes. Instead, have WriteFixed call WriteBytes and replace any other uses of WriteBytes(&value, sizeof(value)) with WriteFixed(value) instead. Also makes the following additional changes: * Expose WriteByte(value), instead of forcing use of WriteFixed<uint8_t> or Raw<1,T>::Write to get the same behavior. * Rename Print/VPrint to Printf/VPrintf, so methods taking format strings are named consistently with others in the codebase. * Add format string checking to Printf when supported. * Add AddString() for non-formatted string writing. Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-mac-release-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try Change-Id: Ib70ccaa752dbf9ead5ea57e386a67725723bac84 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164324 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>