17 using namespace llvm::codeview;
21 Limit.MaxLength = MaxLength;
22 Limit.BeginOffset = getCurrentOffset();
55 assert(Min.
hasValue() &&
"Every field must have a maximum length!");
72 uint8_t Leaf = Reader->
peek();
77 unsigned BytesToAdvance = Leaf & 0x0F;
78 return Reader->
skip(BytesToAdvance);
97 Bytes.assign(BytesRef.
begin(), BytesRef.
end());
119 if (
auto EC = writeEncodedUnsignedInteger(static_cast<uint64_t>(Value)))
122 if (
auto EC = writeEncodedSignedInteger(Value))
137 if (
auto EC = writeEncodedUnsignedInteger(Value))
152 return writeEncodedUnsignedInteger(Value.
getZExtValue());
155 return consume(*Reader, Value);
181 if (
auto EC = Reader->
readBytes(GuidBytes, GuidSize))
183 memcpy(Guid.
Guid, GuidBytes.
data(), GuidSize);
190 for (
auto V : Value) {
209 Error CodeViewRecordIO::writeEncodedSignedInteger(
const int64_t &
Value) {
210 assert(Value < 0 &&
"Encoded integer is not signed!");
235 Error CodeViewRecordIO::writeEncodedUnsignedInteger(
const uint64_t &Value) {
236 if (Value < LF_NUMERIC) {
Error mapByteVectorTail(ArrayRef< uint8_t > &Bytes)
void push_back(const T &Elt)
Error padToAlignment(uint32_t Align)
Error writeBytes(ArrayRef< uint8_t > Buffer)
Write the bytes specified in Buffer to the underlying stream.
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
uint64_t getZExtValue() const
Get zero extended value.
Error readInteger(T &Dest)
Read an integer of the specified endianness into Dest and update the stream's offset.
Maximum length of the test input libFuzzer tries to guess a good value based on the corpus and reports it always prefer smaller inputs during the corpus shuffle When libFuzzer itself reports a bug this exit code will be used If indicates the maximal total time in seconds to run the fuzzer minimizes the provided crash input Use with tries to cleanse the provided crash input to make it contain fewer original bytes Use with exact_artifact_path to specify the output Experimental Use value profile to guide fuzzing Number of jobs to run If min(jobs, NumberOfCpuCores()/2)\" is used.") FUZZER_FLAG_INT(reload
Error mapInteger(TypeIndex &TypeInd)
Error mapStringZVectorZ(std::vector< StringRef > &Value)
Error mapGuid(GUID &Guid)
int64_t getExtValue() const
Get the correctly-extended int64_t value.
void setIndex(uint32_t I)
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Error beginRecord(Optional< uint32_t > MaxLength)
This represents the 'GUID' type from windows.h.
uint8_t peek() const
Examine the next byte of the underlying stream without advancing the stream's offset.
Error readCString(StringRef &Dest)
Read a null terminated string from Dest.
LLVM_NODISCARD bool empty() const
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef take_front(size_t N=1) const
Return a StringRef equal to 'this' but with only the first N elements remaining.
Error padToAlignment(uint32_t Align)
uint32_t getIndex() const
uint32_t bytesRemaining() const
int64_t getSExtValue() const
Get sign extended value.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
uint32_t maxFieldLength() const
Error writeInteger(T Value)
Write the the integer Value to the underlying stream in the specified endianness. ...
Error writeCString(StringRef Str)
Write the the string Str to the underlying stream followed by a null terminator.
static ErrorSuccess success()
Create a success value.
Error mapEncodedInteger(int64_t &Value)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
Error readBytes(ArrayRef< uint8_t > &Buffer, uint32_t Size)
Read Size bytes from the underlying stream at the current offset and and set Buffer to the resulting ...
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
Error padToAlignment(uint32_t Align)
Error skip(uint32_t Amount)
Advance the stream's offset by Amount bytes.
Error mapStringZ(StringRef &Value)
Error consume(BinaryStreamReader &Reader)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.