[llvm] Use llvm::endianness::{big,little,native} (NFC)
Now that llvm::support::endianness has been renamed to llvm::endianness, we can use the shorter form. This patch replaces support::endianness::{big,little,native} with llvm::endianness::{big,little,native}.
This commit is contained in:
parent
8c67c48591
commit
b05dbc4d5f
@ -90,7 +90,7 @@ struct PLTCallStubInfo {
|
||||
|
||||
template <support::endianness Endianness>
|
||||
inline PLTCallStubInfo pickStub(PLTCallStubKind StubKind) {
|
||||
constexpr bool isLE = Endianness == support::endianness::little;
|
||||
constexpr bool isLE = Endianness == llvm::endianness::little;
|
||||
switch (StubKind) {
|
||||
case LongBranch: {
|
||||
ArrayRef<char> Content =
|
||||
@ -273,14 +273,14 @@ inline static uint16_t highesta(uint64_t x) { return (x + 0x8000) >> 48; }
|
||||
// its endian.
|
||||
template <support::endianness Endianness>
|
||||
inline static uint64_t readPrefixedInstruction(const char *Loc) {
|
||||
constexpr bool isLE = Endianness == support::endianness::little;
|
||||
constexpr bool isLE = Endianness == llvm::endianness::little;
|
||||
uint64_t Inst = support::endian::read64<Endianness>(Loc);
|
||||
return isLE ? (Inst << 32) | (Inst >> 32) : Inst;
|
||||
}
|
||||
|
||||
template <support::endianness Endianness>
|
||||
inline static void writePrefixedInstruction(char *Loc, uint64_t Inst) {
|
||||
constexpr bool isLE = Endianness == support::endianness::little;
|
||||
constexpr bool isLE = Endianness == llvm::endianness::little;
|
||||
Inst = isLE ? (Inst << 32) | (Inst >> 32) : Inst;
|
||||
support::endian::write64<Endianness>(Loc, Inst);
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ public:
|
||||
|
||||
template <typename T>
|
||||
using HasByteSwapT = decltype(support::endian::byte_swap(
|
||||
std::declval<T &>(), support::endianness::little));
|
||||
std::declval<T &>(), llvm::endianness::little));
|
||||
/// Adjust `Value` for the target endianness and add it to the hash.
|
||||
template <typename T>
|
||||
std::enable_if_t<is_detected<HasByteSwapT, T>::value, HashBuilder &>
|
||||
@ -393,8 +393,8 @@ public:
|
||||
hash_code Code;
|
||||
};
|
||||
|
||||
using HashCodeHashBuilder = HashBuilder<hashbuilder_detail::HashCodeHasher,
|
||||
support::endianness::native>;
|
||||
using HashCodeHashBuilder =
|
||||
HashBuilder<hashbuilder_detail::HashCodeHasher, llvm::endianness::native>;
|
||||
} // namespace hashbuilder_detail
|
||||
|
||||
/// Provide a default implementation of `hash_value` when `addHash(const T &)`
|
||||
|
@ -68,8 +68,8 @@ Error DWARFLinkerImpl::link() {
|
||||
|
||||
if (TheDwarfEmitter) {
|
||||
GlobalEndianness = TheDwarfEmitter->getTargetTriple().isLittleEndian()
|
||||
? support::endianness::little
|
||||
: support::endianness::big;
|
||||
? llvm::endianness::little
|
||||
: llvm::endianness::big;
|
||||
}
|
||||
|
||||
for (std::unique_ptr<LinkContext> &Context : ObjectContexts) {
|
||||
|
@ -227,8 +227,8 @@ protected:
|
||||
// Set context format&endianness based on the input file.
|
||||
Format.Version = File.Dwarf->getMaxVersion();
|
||||
Format.AddrSize = File.Dwarf->getCUAddrSize();
|
||||
Endianness = File.Dwarf->isLittleEndian() ? support::endianness::little
|
||||
: support::endianness::big;
|
||||
Endianness = File.Dwarf->isLittleEndian() ? llvm::endianness::little
|
||||
: llvm::endianness::big;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ protected:
|
||||
|
||||
/// Output format.
|
||||
dwarf::FormParams Format = {4, 4, dwarf::DWARF32};
|
||||
support::endianness Endianess = support::endianness::little;
|
||||
support::endianness Endianess = llvm::endianness::little;
|
||||
};
|
||||
|
||||
/// This class keeps contents and offsets to the debug sections. Any objects
|
||||
|
@ -394,7 +394,7 @@ static Error writePublics(BinaryStreamWriter &Writer,
|
||||
|
||||
static Error writeRecords(BinaryStreamWriter &Writer,
|
||||
ArrayRef<CVSymbol> Records) {
|
||||
BinaryItemStream<CVSymbol> ItemStream(support::endianness::little);
|
||||
BinaryItemStream<CVSymbol> ItemStream(llvm::endianness::little);
|
||||
ItemStream.setItems(Records);
|
||||
BinaryStreamRef RecordsRef(ItemStream);
|
||||
return Writer.writeStreamRef(RecordsRef);
|
||||
|
@ -84,14 +84,14 @@ private:
|
||||
|
||||
template <>
|
||||
const uint8_t TLSInfoTableManager_ELF_ppc64<
|
||||
support::endianness::little>::TLSInfoEntryContent[16] = {
|
||||
llvm::endianness::little>::TLSInfoEntryContent[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*pthread key */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /*data address*/
|
||||
};
|
||||
|
||||
template <>
|
||||
const uint8_t TLSInfoTableManager_ELF_ppc64<
|
||||
support::endianness::big>::TLSInfoEntryContent[16] = {
|
||||
llvm::endianness::big>::TLSInfoEntryContent[16] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*pthread key */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /*data address*/
|
||||
};
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
switch (TT.getArch()) {
|
||||
case Triple::x86_64:
|
||||
PointerSize = 8;
|
||||
Endianness = support::endianness::little;
|
||||
Endianness = llvm::endianness::little;
|
||||
break;
|
||||
default:
|
||||
llvm_unreachable("Unrecognized architecture");
|
||||
|
@ -158,15 +158,15 @@ public:
|
||||
|
||||
std::optional<StringRef> FileName;
|
||||
if (!DebugLineSectionData.empty()) {
|
||||
assert((G.getEndianness() == support::endianness::big ||
|
||||
G.getEndianness() == support::endianness::little) &&
|
||||
assert((G.getEndianness() == llvm::endianness::big ||
|
||||
G.getEndianness() == llvm::endianness::little) &&
|
||||
"G.getEndianness() must be either big or little");
|
||||
auto DWARFCtx = DWARFContext::create(DebugSectionMap, G.getPointerSize(),
|
||||
G.getEndianness() ==
|
||||
support::endianness::little);
|
||||
auto DWARFCtx =
|
||||
DWARFContext::create(DebugSectionMap, G.getPointerSize(),
|
||||
G.getEndianness() == llvm::endianness::little);
|
||||
DWARFDataExtractor DebugLineData(
|
||||
DebugLineSectionData,
|
||||
G.getEndianness() == support::endianness::little, G.getPointerSize());
|
||||
DebugLineSectionData, G.getEndianness() == llvm::endianness::little,
|
||||
G.getPointerSize());
|
||||
uint64_t Offset = 0;
|
||||
DWARFDebugLine::LineTable LineTable;
|
||||
|
||||
|
@ -47,22 +47,22 @@ public:
|
||||
switch (TT.getArch()) {
|
||||
case Triple::x86_64:
|
||||
PointerSize = 8;
|
||||
Endianness = support::endianness::little;
|
||||
Endianness = llvm::endianness::little;
|
||||
EdgeKind = jitlink::x86_64::Pointer64;
|
||||
break;
|
||||
case Triple::aarch64:
|
||||
PointerSize = 8;
|
||||
Endianness = support::endianness::little;
|
||||
Endianness = llvm::endianness::little;
|
||||
EdgeKind = jitlink::aarch64::Pointer64;
|
||||
break;
|
||||
case Triple::ppc64:
|
||||
PointerSize = 8;
|
||||
Endianness = support::endianness::big;
|
||||
Endianness = llvm::endianness::big;
|
||||
EdgeKind = jitlink::ppc64::Pointer64;
|
||||
break;
|
||||
case Triple::ppc64le:
|
||||
PointerSize = 8;
|
||||
Endianness = support::endianness::little;
|
||||
Endianness = llvm::endianness::little;
|
||||
EdgeKind = jitlink::ppc64::Pointer64;
|
||||
break;
|
||||
default:
|
||||
|
@ -542,7 +542,7 @@ Expected<support::endianness>
|
||||
DLLImportDefinitionGenerator::getTargetEndianness(const Triple &TT) {
|
||||
switch (TT.getArch()) {
|
||||
case Triple::x86_64:
|
||||
return support::endianness::little;
|
||||
return llvm::endianness::little;
|
||||
default:
|
||||
return make_error<StringError>(
|
||||
"architecture unsupported by DLLImportDefinitionGenerator",
|
||||
|
@ -71,7 +71,7 @@ std::unique_ptr<jitlink::LinkGraph> createPlatformGraph(MachOPlatform &MOP,
|
||||
case Triple::aarch64:
|
||||
case Triple::x86_64:
|
||||
PointerSize = 8;
|
||||
Endianness = support::endianness::little;
|
||||
Endianness = llvm::endianness::little;
|
||||
break;
|
||||
default:
|
||||
llvm_unreachable("Unrecognized architecture");
|
||||
|
@ -857,25 +857,23 @@ BinaryCoverageReader::createCoverageReaderFromBuffer(
|
||||
new BinaryCoverageReader(std::move(FuncRecords)));
|
||||
Reader->ProfileNames = std::move(ProfileNames);
|
||||
StringRef FuncRecordsRef = Reader->FuncRecords->getBuffer();
|
||||
if (BytesInAddress == 4 && Endian == support::endianness::little) {
|
||||
if (Error E =
|
||||
readCoverageMappingData<uint32_t, support::endianness::little>(
|
||||
Reader->ProfileNames, Coverage, FuncRecordsRef,
|
||||
Reader->MappingRecords, CompilationDir, Reader->Filenames))
|
||||
return std::move(E);
|
||||
} else if (BytesInAddress == 4 && Endian == support::endianness::big) {
|
||||
if (Error E = readCoverageMappingData<uint32_t, support::endianness::big>(
|
||||
if (BytesInAddress == 4 && Endian == llvm::endianness::little) {
|
||||
if (Error E = readCoverageMappingData<uint32_t, llvm::endianness::little>(
|
||||
Reader->ProfileNames, Coverage, FuncRecordsRef,
|
||||
Reader->MappingRecords, CompilationDir, Reader->Filenames))
|
||||
return std::move(E);
|
||||
} else if (BytesInAddress == 8 && Endian == support::endianness::little) {
|
||||
if (Error E =
|
||||
readCoverageMappingData<uint64_t, support::endianness::little>(
|
||||
Reader->ProfileNames, Coverage, FuncRecordsRef,
|
||||
Reader->MappingRecords, CompilationDir, Reader->Filenames))
|
||||
} else if (BytesInAddress == 4 && Endian == llvm::endianness::big) {
|
||||
if (Error E = readCoverageMappingData<uint32_t, llvm::endianness::big>(
|
||||
Reader->ProfileNames, Coverage, FuncRecordsRef,
|
||||
Reader->MappingRecords, CompilationDir, Reader->Filenames))
|
||||
return std::move(E);
|
||||
} else if (BytesInAddress == 8 && Endian == support::endianness::big) {
|
||||
if (Error E = readCoverageMappingData<uint64_t, support::endianness::big>(
|
||||
} else if (BytesInAddress == 8 && Endian == llvm::endianness::little) {
|
||||
if (Error E = readCoverageMappingData<uint64_t, llvm::endianness::little>(
|
||||
Reader->ProfileNames, Coverage, FuncRecordsRef,
|
||||
Reader->MappingRecords, CompilationDir, Reader->Filenames))
|
||||
return std::move(E);
|
||||
} else if (BytesInAddress == 8 && Endian == llvm::endianness::big) {
|
||||
if (Error E = readCoverageMappingData<uint64_t, llvm::endianness::big>(
|
||||
Reader->ProfileNames, Coverage, FuncRecordsRef,
|
||||
Reader->MappingRecords, CompilationDir, Reader->Filenames))
|
||||
return std::move(E);
|
||||
@ -889,7 +887,7 @@ BinaryCoverageReader::createCoverageReaderFromBuffer(
|
||||
static Expected<std::unique_ptr<BinaryCoverageReader>>
|
||||
loadTestingFormat(StringRef Data, StringRef CompilationDir) {
|
||||
uint8_t BytesInAddress = 8;
|
||||
support::endianness Endian = support::endianness::little;
|
||||
support::endianness Endian = llvm::endianness::little;
|
||||
|
||||
// Read the magic and version.
|
||||
Data = Data.substr(sizeof(TestingFormatMagic));
|
||||
@ -897,7 +895,7 @@ loadTestingFormat(StringRef Data, StringRef CompilationDir) {
|
||||
return make_error<CoverageMapError>(coveragemap_error::malformed,
|
||||
"the size of data is too small");
|
||||
auto TestingVersion =
|
||||
support::endian::byte_swap<uint64_t, support::endianness::little>(
|
||||
support::endian::byte_swap<uint64_t, llvm::endianness::little>(
|
||||
*reinterpret_cast<const uint64_t *>(Data.data()));
|
||||
Data = Data.substr(sizeof(uint64_t));
|
||||
|
||||
@ -957,7 +955,7 @@ loadTestingFormat(StringRef Data, StringRef CompilationDir) {
|
||||
auto const *CovHeader = reinterpret_cast<const CovMapHeader *>(
|
||||
Data.substr(0, sizeof(CovMapHeader)).data());
|
||||
auto Version =
|
||||
CovMapVersion(CovHeader->getVersion<support::endianness::little>());
|
||||
CovMapVersion(CovHeader->getVersion<llvm::endianness::little>());
|
||||
|
||||
// In Version1, the size of CoverageMapping is calculated.
|
||||
if (TestingVersion == uint64_t(TestingFormatVersion::Version1)) {
|
||||
@ -965,7 +963,7 @@ loadTestingFormat(StringRef Data, StringRef CompilationDir) {
|
||||
CoverageMappingSize = Data.size();
|
||||
} else {
|
||||
auto FilenamesSize =
|
||||
CovHeader->getFilenamesSize<support::endianness::little>();
|
||||
CovHeader->getFilenamesSize<llvm::endianness::little>();
|
||||
CoverageMappingSize = sizeof(CovMapHeader) + FilenamesSize;
|
||||
}
|
||||
}
|
||||
@ -1046,9 +1044,8 @@ loadBinaryFormat(std::unique_ptr<Binary> Bin, StringRef Arch,
|
||||
|
||||
// The coverage uses native pointer sizes for the object it's written in.
|
||||
uint8_t BytesInAddress = OF->getBytesInAddress();
|
||||
support::endianness Endian = OF->isLittleEndian()
|
||||
? support::endianness::little
|
||||
: support::endianness::big;
|
||||
support::endianness Endian =
|
||||
OF->isLittleEndian() ? llvm::endianness::little : llvm::endianness::big;
|
||||
|
||||
// Look for the sections that we are interested in.
|
||||
auto ObjFormat = OF->getTripleObjectFormat();
|
||||
@ -1156,7 +1153,7 @@ BinaryCoverageReader::create(
|
||||
|
||||
if (ObjectBuffer.getBuffer().size() > sizeof(TestingFormatMagic)) {
|
||||
uint64_t Magic =
|
||||
support::endian::byte_swap<uint64_t, support::endianness::little>(
|
||||
support::endian::byte_swap<uint64_t, llvm::endianness::little>(
|
||||
*reinterpret_cast<const uint64_t *>(ObjectBuffer.getBufferStart()));
|
||||
if (Magic == TestingFormatMagic) {
|
||||
// This is a special format used for testing.
|
||||
|
@ -252,7 +252,7 @@ void CoverageMappingWriter::write(raw_ostream &OS) {
|
||||
|
||||
void TestingFormatWriter::write(raw_ostream &OS, TestingFormatVersion Version) {
|
||||
auto ByteSwap = [](uint64_t N) {
|
||||
return support::endian::byte_swap<uint64_t, support::endianness::little>(N);
|
||||
return support::endian::byte_swap<uint64_t, llvm::endianness::little>(N);
|
||||
};
|
||||
|
||||
// Output a 64bit magic number.
|
||||
|
@ -428,18 +428,19 @@ DECODE_SDWA(VopcDst)
|
||||
|
||||
template <typename T> static inline T eatBytes(ArrayRef<uint8_t>& Bytes) {
|
||||
assert(Bytes.size() >= sizeof(T));
|
||||
const auto Res = support::endian::read<T, support::endianness::little>(Bytes.data());
|
||||
const auto Res =
|
||||
support::endian::read<T, llvm::endianness::little>(Bytes.data());
|
||||
Bytes = Bytes.slice(sizeof(T));
|
||||
return Res;
|
||||
}
|
||||
|
||||
static inline DecoderUInt128 eat12Bytes(ArrayRef<uint8_t> &Bytes) {
|
||||
assert(Bytes.size() >= 12);
|
||||
uint64_t Lo = support::endian::read<uint64_t, support::endianness::little>(
|
||||
Bytes.data());
|
||||
uint64_t Lo =
|
||||
support::endian::read<uint64_t, llvm::endianness::little>(Bytes.data());
|
||||
Bytes = Bytes.slice(8);
|
||||
uint64_t Hi = support::endian::read<uint32_t, support::endianness::little>(
|
||||
Bytes.data());
|
||||
uint64_t Hi =
|
||||
support::endian::read<uint32_t, llvm::endianness::little>(Bytes.data());
|
||||
Bytes = Bytes.slice(4);
|
||||
return DecoderUInt128(Lo, Hi);
|
||||
}
|
||||
@ -2076,7 +2077,7 @@ MCDisassembler::DecodeStatus AMDGPUDisassembler::decodeKernelDescriptor(
|
||||
if (isGFX10Plus()) {
|
||||
uint16_t KernelCodeProperties =
|
||||
support::endian::read16(&Bytes[amdhsa::KERNEL_CODE_PROPERTIES_OFFSET],
|
||||
support::endianness::little);
|
||||
llvm::endianness::little);
|
||||
EnableWavefrontSize32 =
|
||||
AMDHSA_BITS_GET(KernelCodeProperties,
|
||||
amdhsa::KERNEL_CODE_PROPERTY_ENABLE_WAVEFRONT_SIZE32);
|
||||
|
@ -411,7 +411,7 @@ void AMDGPUMCCodeEmitter::encodeInstruction(const MCInst &MI,
|
||||
} else if (!Op.isExpr()) // Exprs will be replaced with a fixup value.
|
||||
llvm_unreachable("Must be immediate or expr");
|
||||
|
||||
support::endian::write<uint32_t>(CB, Imm, support::endianness::little);
|
||||
support::endian::write<uint32_t>(CB, Imm, llvm::endianness::little);
|
||||
|
||||
// Only one literal value allowed
|
||||
break;
|
||||
|
@ -723,7 +723,7 @@ void AMDGPUPALMetadata::toLegacyBlob(std::string &Blob) {
|
||||
if (Registers.getMap().empty())
|
||||
return;
|
||||
raw_string_ostream OS(Blob);
|
||||
support::endian::Writer EW(OS, support::endianness::little);
|
||||
support::endian::Writer EW(OS, llvm::endianness::little);
|
||||
for (auto I : Registers.getMap()) {
|
||||
EW.write(uint32_t(I.first.getUInt()));
|
||||
EW.write(uint32_t(I.second.getUInt()));
|
||||
|
@ -285,7 +285,7 @@ void AVRMCCodeEmitter::encodeInstruction(const MCInst &MI,
|
||||
|
||||
for (int64_t i = Size / 2 - 1; i >= 0; --i) {
|
||||
uint16_t Word = (BinaryOpCode >> (i * 16)) & 0xFFFF;
|
||||
support::endian::write(CB, Word, support::endianness::little);
|
||||
support::endian::write(CB, Word, llvm::endianness::little);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,8 +109,8 @@ template <typename T>
|
||||
bool parseImmediate(MCInst &MI, uint64_t &Size, ArrayRef<uint8_t> Bytes) {
|
||||
if (Size + sizeof(T) > Bytes.size())
|
||||
return false;
|
||||
T Val = support::endian::read<T, support::endianness::little, 1>(
|
||||
Bytes.data() + Size);
|
||||
T Val = support::endian::read<T, llvm::endianness::little, 1>(Bytes.data() +
|
||||
Size);
|
||||
Size += sizeof(T);
|
||||
if (std::is_floating_point<T>::value) {
|
||||
MI.addOperand(
|
||||
|
@ -788,8 +788,8 @@ bool GCOVProfiler::emitProfileNotes(
|
||||
std::vector<uint8_t> EdgeDestinations;
|
||||
SmallVector<std::pair<GlobalVariable *, MDNode *>, 8> CountersBySP;
|
||||
|
||||
Endian = M->getDataLayout().isLittleEndian() ? support::endianness::little
|
||||
: support::endianness::big;
|
||||
Endian = M->getDataLayout().isLittleEndian() ? llvm::endianness::little
|
||||
: llvm::endianness::big;
|
||||
unsigned FunctionIdent = 0;
|
||||
for (auto &F : M->functions()) {
|
||||
DISubprogram *SP = F.getSubprogram();
|
||||
@ -957,7 +957,7 @@ bool GCOVProfiler::emitProfileNotes(
|
||||
continue;
|
||||
}
|
||||
os = &out;
|
||||
if (Endian == support::endianness::big) {
|
||||
if (Endian == llvm::endianness::big) {
|
||||
out.write("gcno", 4);
|
||||
out.write(Options.Version, 4);
|
||||
} else {
|
||||
|
@ -57,7 +57,7 @@ Error writeMetadata(support::endian::Writer &OS, Values &&... Ds) {
|
||||
} // namespace
|
||||
|
||||
FDRTraceWriter::FDRTraceWriter(raw_ostream &O, const XRayFileHeader &H)
|
||||
: OS(O, support::endianness::native) {
|
||||
: OS(O, llvm::endianness::native) {
|
||||
// We need to re-construct a header, by writing the fields we care about for
|
||||
// traces, in the format that the runtime would have written.
|
||||
uint32_t BitField =
|
||||
|
@ -113,8 +113,7 @@ void PrinterContext<ELFT>::printEHFrameHdr(const Elf_Phdr *EHFramePHdr) const {
|
||||
if (!Content)
|
||||
reportError(Content.takeError(), ObjF.getFileName());
|
||||
|
||||
DataExtractor DE(*Content,
|
||||
ELFT::TargetEndianness == support::endianness::little,
|
||||
DataExtractor DE(*Content, ELFT::TargetEndianness == llvm::endianness::little,
|
||||
ELFT::Is64Bits ? 8 : 4);
|
||||
|
||||
DictScope D(W, "Header");
|
||||
@ -189,7 +188,7 @@ void PrinterContext<ELFT>::printEHFrame(const Elf_Shdr *EHFrameShdr) const {
|
||||
ObjF, DWARFContext::ProcessDebugRelocations::Process, nullptr);
|
||||
DWARFDataExtractor DE(DICtx->getDWARFObj(),
|
||||
DICtx->getDWARFObj().getEHFrameSection(),
|
||||
ELFT::TargetEndianness == support::endianness::little,
|
||||
ELFT::TargetEndianness == llvm::endianness::little,
|
||||
ELFT::Is64Bits ? 8 : 4);
|
||||
DWARFDebugFrame EHFrame(Triple::ArchType(ObjF.getArch()), /*IsEH=*/true,
|
||||
/*EHFrameAddress=*/Address);
|
||||
|
@ -104,7 +104,7 @@ void TraceConverter::exportAsYAML(const Trace &Records, raw_ostream &OS) {
|
||||
void TraceConverter::exportAsRAWv1(const Trace &Records, raw_ostream &OS) {
|
||||
// First write out the file header, in the correct endian-appropriate format
|
||||
// (XRay assumes currently little endian).
|
||||
support::endian::Writer Writer(OS, support::endianness::little);
|
||||
support::endian::Writer Writer(OS, llvm::endianness::little);
|
||||
const auto &FH = Records.getFileHeader();
|
||||
Writer.write(FH.Version);
|
||||
Writer.write(FH.Type);
|
||||
|
@ -62,7 +62,7 @@ TEST(BLAKE3Test, BLAKE3) {
|
||||
"616F575A1B58D4C9797D4217B9730AE5E6EB319D76EDEF6549B46F4EFE31FF8B");
|
||||
|
||||
// Using generic HashBuilder.
|
||||
HashBuilder<BLAKE3, support::endianness::native> HashBuilder;
|
||||
HashBuilder<BLAKE3, llvm::endianness::native> HashBuilder;
|
||||
HashBuilder.update(std::get<0>(testvectors[2]));
|
||||
BLAKE3Result<> HBHash1 = HashBuilder.final();
|
||||
BLAKE3Result<> HBHash2 = HashBuilder.result();
|
||||
@ -84,7 +84,7 @@ TEST(BLAKE3Test, SmallerHashSize) {
|
||||
EXPECT_EQ(hashStr1, "6437B3AC38465133FFB63B75273A8DB5");
|
||||
|
||||
// Using generic HashBuilder.
|
||||
HashBuilder<TruncatedBLAKE3<16>, support::endianness::native> HashBuilder;
|
||||
HashBuilder<TruncatedBLAKE3<16>, llvm::endianness::native> HashBuilder;
|
||||
HashBuilder.update(Input);
|
||||
BLAKE3Result<16> hash3 = HashBuilder.final();
|
||||
BLAKE3Result<16> hash4 = HashBuilder.result();
|
||||
|
Loading…
x
Reference in New Issue
Block a user