Rename llvm::support::endianness to llvm::endianness

LLVM is gearing up to move to `std::endianness` and as part of that has
moved `llvm::support::endianness` to `llvm::endianness`
(bbdbcd83e6702f314d147a680247058a899ba261). Rename our uses.
This commit is contained in:
Ben Barham
2024-03-13 20:26:29 -07:00
parent acd0efa67f
commit cacfd3e3ae
19 changed files with 208 additions and 191 deletions

View File

@@ -64,11 +64,11 @@ bool SerializedLocalizationWriter::emit(llvm::StringRef filePath) {
offset_type offset;
{
llvm::support::endian::write<offset_type>(OS, 0, llvm::support::little);
llvm::support::endian::write<offset_type>(OS, 0, llvm::endianness::little);
offset = generator.Emit(OS);
}
OS.seek(0);
llvm::support::endian::write(OS, offset, llvm::support::little);
llvm::support::endian::write(OS, offset, llvm::endianness::little);
OS.close();
return OS.has_error();
@@ -116,7 +116,8 @@ SerializedLocalizationProducer::SerializedLocalizationProducer(
bool SerializedLocalizationProducer::initializeImpl() {
auto base =
reinterpret_cast<const unsigned char *>(Buffer.get()->getBufferStart());
auto tableOffset = endian::read<offset_type>(base, little);
auto tableOffset =
llvm::support::endian::read<offset_type>(base, llvm::endianness::little);
SerializedTable.reset(SerializedLocalizationTable::Create(
base + tableOffset, base + sizeof(offset_type), base));
return true;