27 make_error<RawError>(raw_error_code::corrupt_file,
28 "Expected hash table number of words"));
34 make_error<RawError>(raw_error_code::corrupt_file,
35 "Expected hash table word"));
37 if (Word & (1U <<
Idx))
38 V.set((
I * 32) +
Idx);
45 constexpr int BitsPerWord = 8 *
sizeof(
uint32_t);
52 make_error<RawError>(raw_error_code::corrupt_file,
53 "Could not write linear map number of words"));
58 for (
uint32_t WordIdx = 0; WordIdx < 32; ++WordIdx, ++
Idx) {
60 Word |= (1 << WordIdx);
63 return joinErrors(std::move(EC), make_error<RawError>(
64 raw_error_code::corrupt_file,
65 "Could not write linear map word"));
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
Provides read only access to a subclass of BinaryStream.
Error readInteger(T &Dest)
Read an integer of the specified endianness into Dest and update the stream's offset.
Provides write only access to a subclass of WritableBinaryStream.
Error writeInteger(T Value)
Write the integer Value to the underlying stream in the specified endianness.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
bool test(unsigned Idx) const
Error readSparseBitVector(BinaryStreamReader &Stream, SparseBitVector<> &V)
Error writeSparseBitVector(BinaryStreamWriter &Writer, SparseBitVector<> &Vec)
This is an optimization pass for GlobalISel generic memory operations.
Error joinErrors(Error E1, Error E2)
Concatenate errors.
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.