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);
70 size_t BytesNeeded = Name.
size() + 1;
72 if (BytesNeeded > BytesLeft) {
95 if (CVR.
Type != TypeLeafKind::LF_FIELDLIST &&
96 CVR.
Type != TypeLeafKind::LF_METHODLIST)
121 constexpr
uint32_t ContinuationLength = 8;
123 ContinuationLength));
125 MemberKind = Record.
Kind;
202 error(IO.mapEncodedInteger(Record.
Size));
209 assert((CVR.
Type == TypeLeafKind::LF_STRUCTURE) ||
210 (CVR.
Type == TypeLeafKind::LF_CLASS) ||
211 (CVR.
Type == TypeLeafKind::LF_INTERFACE));
218 error(IO.mapEncodedInteger(Record.
Size));
229 error(IO.mapEncodedInteger(Record.
Size));
258 if (IO.isWriting()) {
261 error(IO.mapInteger(Size));
266 Byte |=
static_cast<uint8_t
>(Slots[
SlotIndex + 1]);
268 error(IO.mapInteger(Byte));
271 error(IO.mapInteger(Size));
272 for (uint16_t
I = 0;
I < Size;
I += 2) {
274 error(IO.mapInteger(Byte));
275 Record.
Slots.push_back(static_cast<VFTableSlotKind>(Byte & 0xF));
277 Record.
Slots.push_back(static_cast<VFTableSlotKind>(Byte >> 4));
289 if (IO.isWriting()) {
291 NamesLen +=
Name.size() + 1;
293 error(IO.mapInteger(NamesLen));
294 error(IO.mapVectorTail(
415 MapOneMethodRecord Mapper(
false);
416 return Mapper(IO, Record);
421 uint16_t Padding = 0;
453 uint16_t Padding = 0;
462 uint16_t Padding = 0;
Error mapByteVectorTail(ArrayRef< uint8_t > &Bytes)
Error mapVectorN(T &Items, const ElementMapper &Mapper)
Error mapInteger(TypeIndex &TypeInd)
std::vector< TypeIndex > StringIndices
Error visitMemberEnd(CVMemberRecord &Record) override
TypeIndex OverriddenVFTable
Error beginRecord(Optional< uint32_t > MaxLength)
bool isPointerToMember() const
Error visitTypeEnd(CVType &Record) override
bool isIntroducingVirtual() const
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
Error visitTypeBegin(CVType &Record) override
Paired begin/end actions for all types.
TypeIndex ContinuationIndex
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
size_t size() const
size - Get the array size.
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 etc Experimental Use value profile to guide fuzzing Number of simultaneous worker processes to run the jobs If min(jobs, NumberOfCpuCores()/2)\" is used.") FUZZER_FLAG_INT(reload
* 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.
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
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