aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/SampleProfReader.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-09-27 09:05:16 -0700
committerGitHub <noreply@github.com>2025-09-27 09:05:16 -0700
commit798ccd2e4722b228317e8a30dd3624a0308a927e (patch)
treea2c4d3a6893139e001a1db68b1b49051fbf17a6e /llvm/lib/ProfileData/SampleProfReader.cpp
parent3163fcfa453dce61aa06da05272a660b18407623 (diff)
downloadllvm-798ccd2e4722b228317e8a30dd3624a0308a927e.zip
llvm-798ccd2e4722b228317e8a30dd3624a0308a927e.tar.gz
llvm-798ccd2e4722b228317e8a30dd3624a0308a927e.tar.bz2
[Support] Deprecate one form of support::endian::read (NFC) (#160979)
This is a follow-up to #156140, which deprecated one form of write. We have two forms of read: template <typename value_type, std::size_t alignment> [[nodiscard]] inline value_type read(const void *memory, endianness endian) template <typename value_type, endianness endian, std::size_t alignment> [[nodiscard]] inline value_type read(const void *memory) The difference is that endian is a function parameter in the former but a template parameter in the latter. This patch streamlines the code by migrating the use of the latter to the former while deprecating the latter.
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfReader.cpp')
-rw-r--r--llvm/lib/ProfileData/SampleProfReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp
index 81ae792..766c081 100644
--- a/llvm/lib/ProfileData/SampleProfReader.cpp
+++ b/llvm/lib/ProfileData/SampleProfReader.cpp
@@ -1290,8 +1290,8 @@ SampleProfileReaderExtBinaryBase::readNameTableSec(bool IsMD5,
NameTable.reserve(*Size);
for (size_t I = 0; I < *Size; ++I) {
using namespace support;
- uint64_t FID = endian::read<uint64_t, endianness::little, unaligned>(
- Data + I * sizeof(uint64_t));
+ uint64_t FID = endian::read<uint64_t, unaligned>(
+ Data + I * sizeof(uint64_t), endianness::little);
NameTable.emplace_back(FunctionId(FID));
}
if (!ProfileIsCS)