8#ifndef LLVM_CLANG_AST_INTERP_BITCAST_BUFFER_H
9#define LLVM_CLANG_AST_INTERP_BITCAST_BUFFER_H
11#include "llvm/ADT/SmallVector.h"
28 explicit Bits(
size_t Quantity) :
N(Quantity) {}
57 explicit Bytes(
size_t Quantity) :
N(Quantity) {}
83 std::unique_ptr<std::byte[]>
Data;
89 Data = std::make_unique<std::byte[]>(ByteSize);
115 Endian TargetEndianness)
const;
The JSON file list parser is used to communicate input to InstallAPI.
@ Other
Other implicit parameter.
A bit range. Both Start and End are inclusive.
bool operator<(BitRange Other) const
BitRange(Bits Start, Bits End)
Track what bits have been initialized to known values and which ones have indeterminate value.
std::unique_ptr< std::byte[]> copyBits(Bits BitOffset, Bits BitWidth, Bits FullBitWidth, Endian TargetEndianness) const
Copy BitWidth bits at offset BitOffset from the buffer.
void markInitialized(Bits Start, Bits Length)
Marks the bits in the given range as initialized.
llvm::SmallVector< BitRange > InitializedBits
bool allInitialized() const
Returns true if all bits in the buffer have been initialized.
BitcastBuffer(Bits FinalBitSize)
bool rangeInitialized(Bits Offset, Bits Length) const
Bits size() const
Returns the buffer size in bits.
void pushData(const std::byte *In, Bits BitOffset, Bits BitWidth, Endian TargetEndianness)
Push BitWidth bits at BitOffset from In into the buffer.
std::unique_ptr< std::byte[]> Data
bool operator!=(Bits Other) const
bool operator==(Bits Other) const
size_t roundToBytes() const
Bits operator+=(size_t O)
bool operator<=(Bits Other) const
Bits operator-(Bits Other) const
Bits operator+(Bits Other) const
size_t getOffsetInByte() const
bool operator>=(Bits Other) const
size_t getQuantity() const
size_t getQuantity() const