[all-commits] [llvm/llvm-project] 568368: [Support] Make readNext default to unaligned (#88808)
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Mon Apr 15 19:05:52 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 568368a43e5b4adb3c5d105a0eff3e0c13c0af8c
https://github.com/llvm/llvm-project/commit/568368a43e5b4adb3c5d105a0eff3e0c13c0af8c
Author: Kazu Hirata <kazu at google.com>
Date: 2024-04-15 (Mon, 15 Apr 2024)
Changed paths:
M llvm/include/llvm/Support/Endian.h
M llvm/include/llvm/Support/OnDiskHashTable.h
Log Message:
-----------
[Support] Make readNext default to unaligned (#88808)
Without this patch, you would typically use readNext as:
readNext<uint32_t, llvm::endianness::little, unaligned>(Ptr)
which is quite mouthful. Since most serialization/deserialization
operations are unaligned accesses, this patch makes the alignment
template parameter default to unaligned, allowing us to say:
readNext<uint32_t, llvm::endianness::little>(Ptr)
I'm including a few examples of migration in this patch. I'll do the
rest in a separate patch.
Note that writeNext already has the same trick for the alignment
template parameter.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list