diff options
author | Kazu Hirata <kazu@google.com> | 2023-10-10 18:57:14 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-10-10 18:57:14 -0700 |
commit | b3ec0595d38cfa09f52dc8a5c1c119fa3293d797 (patch) | |
tree | 4f8521ba5c3e206f6f34084deec0e94b145a4fd2 /llvm/lib/Remarks | |
parent | 8f64d52cb8b84a4abc4c432f95b78c6f0d17b579 (diff) | |
download | llvm-b3ec0595d38cfa09f52dc8a5c1c119fa3293d797.zip llvm-b3ec0595d38cfa09f52dc8a5c1c119fa3293d797.tar.gz llvm-b3ec0595d38cfa09f52dc8a5c1c119fa3293d797.tar.bz2 |
[llvm] Drop unaligned from calls to llvm::support::endian::{read,write} (NFC)
The last template parameter of llvm::support::endian::{read,write}
defaults to unaligned, so we can drop that at call sites.
Diffstat (limited to 'llvm/lib/Remarks')
-rw-r--r-- | llvm/lib/Remarks/YAMLRemarkParser.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Remarks/YAMLRemarkParser.cpp b/llvm/lib/Remarks/YAMLRemarkParser.cpp index f5123b0f6..8a7d00a 100644 --- a/llvm/lib/Remarks/YAMLRemarkParser.cpp +++ b/llvm/lib/Remarks/YAMLRemarkParser.cpp @@ -75,8 +75,7 @@ static Expected<uint64_t> parseVersion(StringRef &Buf) { "Expecting version number."); uint64_t Version = - support::endian::read<uint64_t, support::little, support::unaligned>( - Buf.data()); + support::endian::read<uint64_t, support::little>(Buf.data()); if (Version != remarks::CurrentRemarkVersion) return createStringError(std::errc::illegal_byte_sequence, "Mismatching remark version. Got %" PRId64 @@ -91,8 +90,7 @@ static Expected<uint64_t> parseStrTabSize(StringRef &Buf) { return createStringError(std::errc::illegal_byte_sequence, "Expecting string table size."); uint64_t StrTabSize = - support::endian::read<uint64_t, support::little, support::unaligned>( - Buf.data()); + support::endian::read<uint64_t, support::little>(Buf.data()); Buf = Buf.drop_front(sizeof(uint64_t)); return StrTabSize; } |