13 using namespace llvm::codeview;
20 struct MapOneMethodRecord {
21 explicit MapOneMethodRecord(
bool IsFromOverloadList)
22 : IsFromOverloadList(IsFromOverloadList) {}
26 if (IsFromOverloadList) {
36 if (!IsFromOverloadList)
43 bool IsFromOverloadList;
48 StringRef &UniqueName,
bool HasUniqueName) {
55 size_t BytesNeeded = Name.
size() + UniqueName.
size() + 2;
58 if (BytesNeeded > BytesLeft) {
59 size_t BytesToDrop = (BytesNeeded - BytesLeft);
92 if (CVR.
Type != TypeLeafKind::LF_FIELDLIST &&
93 CVR.
Type != TypeLeafKind::LF_METHODLIST)
118 constexpr
uint32_t ContinuationLength = 8;
120 ContinuationLength));
122 MemberKind = Record.
Kind;
215 assert((CVR.
Type == TypeLeafKind::LF_STRUCTURE) ||
216 (CVR.
Type == TypeLeafKind::LF_CLASS) ||
217 (CVR.
Type == TypeLeafKind::LF_INTERFACE));
272 Byte |=
static_cast<uint8_t
>(Slots[
SlotIndex + 1]);
278 for (uint16_t
I = 0;
I <
Size;
I += 2) {
281 Record.
Slots.push_back(static_cast<VFTableSlotKind>(Byte & 0xF));
283 Record.
Slots.push_back(static_cast<VFTableSlotKind>(Byte >> 4));
297 NamesLen +=
Name.size() + 1;
429 MapOneMethodRecord Mapper(
false);
430 return Mapper(IO, Record);
435 uint16_t Padding = 0;
467 uint16_t Padding = 0;
476 uint16_t Padding = 0;
Error mapByteVectorTail(ArrayRef< uint8_t > &Bytes)
Error mapVectorN(T &Items, const ElementMapper &Mapper)
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 visitMemberEnd(CVMemberRecord &Record) override
Error mapGuid(GUID &Guid)
TypeIndex OverriddenVFTable
Error beginRecord(Optional< uint32_t > MaxLength)
bool isPointerToMember() const
Error visitTypeEnd(CVType &Record) override
bool isIntroducingVirtual() 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.
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
Error visitTypeBegin(CVType &Record) override
Paired begin/end actions for all types.
TypeIndex ContinuationIndex
std::vector< TypeIndex > StringIndices
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
size_t size() const
size - Get the array size.
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
bool hasUniqueName() const
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
Optional< MemberPointerInfo > MemberInfo
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
std::vector< TypeIndex > ArgIndices
For method overload sets. LF_METHOD.
std::vector< StringRef > MethodNames
ModifierOptions Modifiers
uint32_t maxFieldLength() const
CallingConvention CallConv
int32_t ThisPointerAdjustment
static ErrorSuccess success()
Create a success value.
Error mapEncodedInteger(int64_t &Value)
static Error mapNameAndUniqueName(CodeViewRecordIO &IO, StringRef &Name, StringRef &UniqueName, bool HasUniqueName)
CallingConvention CallConv
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
std::vector< OneMethodRecord > Methods
SmallVector< TypeIndex, 4 > ArgIndices
Error mapStringZ(StringRef &Value)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
std::vector< VFTableSlotKind > Slots
Lightweight error class with error context and mandatory checking.
Error mapVectorTail(T &Items, const ElementMapper &Mapper)
ArrayRef< VFTableSlotKind > getSlots() const
StringRef - Represent a constant reference to a string, i.e.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef drop_back(size_t N=1) const
Return a StringRef equal to 'this' but with the last N elements dropped.
SlotIndex - An opaque wrapper around machine indexes.
Error visitMemberBegin(CVMemberRecord &Record) override
PointerToMemberRepresentation Representation