diff options
author | Kazu Hirata <kazu@google.com> | 2023-10-13 23:16:25 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-10-13 23:16:25 -0700 |
commit | 02f67c097de12dc9f6c97a68d9e180af79a2483b (patch) | |
tree | c3c5c360a33916e97fd3ca35327048d1eb1436c6 /clang/lib/CodeGen/CodeGenPGO.cpp | |
parent | 514381840c6d7aa775a092556992c87f022a361f (diff) | |
download | llvm-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 'clang/lib/CodeGen/CodeGenPGO.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenPGO.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp index df6c76c..63cdd0a 100644 --- a/clang/lib/CodeGen/CodeGenPGO.cpp +++ b/clang/lib/CodeGen/CodeGenPGO.cpp @@ -755,7 +755,8 @@ void PGOHash::combine(HashType Type) { // Pass through MD5 if enough work has built up. if (Count && Count % NumTypesPerWord == 0) { using namespace llvm::support; - uint64_t Swapped = endian::byte_swap<uint64_t, little>(Working); + uint64_t Swapped = + endian::byte_swap<uint64_t, llvm::endianness::little>(Working); MD5.update(llvm::ArrayRef((uint8_t *)&Swapped, sizeof(Swapped))); Working = 0; } @@ -781,7 +782,8 @@ uint64_t PGOHash::finalize() { MD5.update({(uint8_t)Working}); } else { using namespace llvm::support; - uint64_t Swapped = endian::byte_swap<uint64_t, little>(Working); + uint64_t Swapped = + endian::byte_swap<uint64_t, llvm::endianness::little>(Working); MD5.update(llvm::ArrayRef((uint8_t *)&Swapped, sizeof(Swapped))); } } |