aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/SampleProfReader.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-10-13 23:16:25 -0700
committerKazu Hirata <kazu@google.com>2023-10-13 23:16:25 -0700
commit02f67c097de12dc9f6c97a68d9e180af79a2483b (patch)
treec3c5c360a33916e97fd3ca35327048d1eb1436c6 /llvm/lib/ProfileData/SampleProfReader.cpp
parent514381840c6d7aa775a092556992c87f022a361f (diff)
downloadllvm-02f67c097de12dc9f6c97a68d9e180af79a2483b.zip
llvm-02f67c097de12dc9f6c97a68d9e180af79a2483b.tar.gz
llvm-02f67c097de12dc9f6c97a68d9e180af79a2483b.tar.bz2
Use llvm::endianness::{big,little,native} (NFC)
Note that llvm::support::endianness has been renamed to llvm::endianness while becoming an enum class. This patch replaces {big,little,native} with llvm::endianness::{big,little,native}. This patch completes the migration to llvm::endianness and llvm::endianness::{big,little,native}. I'll post a separate patch to remove the migration helpers in llvm/Support/Endian.h: using endianness = llvm::endianness; constexpr llvm::endianness big = llvm::endianness::big; constexpr llvm::endianness little = llvm::endianness::little; constexpr llvm::endianness native = llvm::endianness::native;
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfReader.cpp')
-rw-r--r--llvm/lib/ProfileData/SampleProfReader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp
index e8e468e..256bdb8 100644
--- a/llvm/lib/ProfileData/SampleProfReader.cpp
+++ b/llvm/lib/ProfileData/SampleProfReader.cpp
@@ -502,7 +502,7 @@ ErrorOr<T> SampleProfileReaderBinary::readUnencodedNumber() {
}
using namespace support;
- T Val = endian::readNext<T, little, unaligned>(Data);
+ T Val = endian::readNext<T, llvm::endianness::little, unaligned>(Data);
return Val;
}
@@ -531,8 +531,8 @@ SampleProfileReaderBinary::readStringFromTable(size_t *RetIdx) {
if (!SR.data()) {
assert(MD5NameMemStart);
using namespace support;
- uint64_t FID = endian::read<uint64_t, little>(MD5NameMemStart +
- (*Idx) * sizeof(uint64_t));
+ uint64_t FID = endian::read<uint64_t, llvm::endianness::little>(
+ MD5NameMemStart + (*Idx) * sizeof(uint64_t));
SR = MD5StringBuf.emplace_back(std::to_string(FID));
}
if (RetIdx)