Lines Matching refs:IO

45 static std::string getFlagNames(CodeViewRecordIO &IO, T Value,
47 if (!IO.isStreaming())
82 static StringRef getEnumName(CodeViewRecordIO &IO, T Value,
84 if (!IO.isStreaming())
97 static std::string getMemberAttributes(CodeViewRecordIO &IO,
100 if (!IO.isStreaming())
103 getEnumName(IO, uint8_t(Access), makeArrayRef(getMemberAccessNames()));
107 getEnumName(IO, unsigned(Kind), makeArrayRef(getMemberKindNames()));
112 IO, unsigned(Options), makeArrayRef(getMethodOptionNames()));
122 Error operator()(CodeViewRecordIO &IO, OneMethodRecord &Method) const {
124 IO, Method.getAccess(), Method.getMethodKind(), Method.getOptions());
125 error(IO.mapInteger(Method.Attrs.Attrs, "Attrs: " + Attrs));
128 error(IO.mapInteger(Padding));
130 error(IO.mapInteger(Method.Type, "Type"));
132 error(IO.mapInteger(Method.VFTableOffset, "VFTableOffset"));
133 } else if (IO.isReading())
137 error(IO.mapStringZ(Method.Name, "Name"));
147 static Error mapNameAndUniqueName(CodeViewRecordIO &IO, StringRef &Name,
149 if (IO.isWriting()) {
153 size_t BytesLeft = IO.maxFieldLength();
167 error(IO.mapStringZ(N));
168 error(IO.mapStringZ(U));
173 error(IO.mapStringZ(N));
179 error(IO.mapStringZ(Name, "Name"));
181 error(IO.mapStringZ(UniqueName, "LinkageName"));
198 error(IO.beginRecord(MaxLen));
201 if (IO.isStreaming()) {
205 getEnumName(IO, unsigned(RecordKind), makeArrayRef(LeafTypeNames));
206 error(IO.mapInteger(RecordLen, "Record length"));
207 error(IO.mapEnum(RecordKind, "Record kind: " + RecordKindName));
213 if (IO.isStreaming())
214 IO.emitRawComment(" " + getLeafTypeName(CVR.kind()) + " (0x" +
223 error(IO.endRecord());
239 error(IO.beginRecord(MaxRecordLength - sizeof(RecordPrefix) -
243 if (IO.isStreaming()) {
247 (getEnumName(IO, unsigned(Record.Kind), makeArrayRef(LeafTypeNames)))
250 error(IO.mapEnum(Record.Kind, "Member kind: " + MemberKindName));
259 if (IO.isReading()) {
260 if (auto EC = IO.skipPadding())
265 error(IO.endRecord());
271 getFlagNames(IO, static_cast<uint16_t>(Record.Modifiers),
273 error(IO.mapInteger(Record.ModifiedType, "ModifiedType"));
274 error(IO.mapEnum(Record.Modifiers, "Modifiers" + ModifierNames));
281 IO, uint8_t(Record.CallConv), makeArrayRef(getCallingConventions()));
283 getFlagNames(IO, static_cast<uint16_t>(Record.Options),
285 error(IO.mapInteger(Record.ReturnType, "ReturnType"));
286 error(IO.mapEnum(Record.CallConv, "CallingConvention: " + CallingConvName));
287 error(IO.mapEnum(Record.Options, "FunctionOptions" + FuncOptionNames));
288 error(IO.mapInteger(Record.ParameterCount, "NumParameters"));
289 error(IO.mapInteger(Record.ArgumentList, "ArgListType"));
297 IO, uint8_t(Record.CallConv), makeArrayRef(getCallingConventions()));
299 getFlagNames(IO, static_cast<uint16_t>(Record.Options),
301 error(IO.mapInteger(Record.ReturnType, "ReturnType"));
302 error(IO.mapInteger(Record.ClassType, "ClassType"));
303 error(IO.mapInteger(Record.ThisType, "ThisType"));
304 error(IO.mapEnum(Record.CallConv, "CallingConvention: " + CallingConvName));
305 error(IO.mapEnum(Record.Options, "FunctionOptions" + FuncOptionNames));
306 error(IO.mapInteger(Record.ParameterCount, "NumParameters"));
307 error(IO.mapInteger(Record.ArgumentList, "ArgListType"));
308 error(IO.mapInteger(Record.ThisPointerAdjustment, "ThisAdjustment"));
314 error(IO.mapVectorN<uint32_t>(
316 [](CodeViewRecordIO &IO, TypeIndex &N) {
317 return IO.mapInteger(N, "Argument");
325 error(IO.mapVectorN<uint32_t>(
327 [](CodeViewRecordIO &IO, TypeIndex &N) {
328 return IO.mapInteger(N, "Strings");
339 if (IO.isStreaming()) {
340 std::string PtrType = getEnumName(IO, unsigned(Record.getPointerKind()),
344 std::string PtrMode = getEnumName(IO, unsigned(Record.getMode()),
368 error(IO.mapInteger(Record.ReferentType, "PointeeType"));
369 error(IO.mapInteger(Record.Attrs, Attr));
372 if (IO.isReading())
376 error(IO.mapInteger(M.ContainingType, "ClassType"));
378 IO, uint16_t(M.Representation), makeArrayRef(getPtrMemberRepNames()));
379 error(IO.mapEnum(M.Representation,
387 error(IO.mapInteger(Record.ElementType, "ElementType"));
388 error(IO.mapInteger(Record.IndexType, "IndexType"));
389 error(IO.mapEncodedInteger(Record.Size, "SizeOf"));
390 error(IO.mapStringZ(Record.Name, "Name"));
401 getFlagNames(IO, static_cast<uint16_t>(Record.Options),
403 error(IO.mapInteger(Record.MemberCount, "MemberCount"));
404 error(IO.mapEnum(Record.Options, "Properties" + PropertiesNames));
405 error(IO.mapInteger(Record.FieldList, "FieldList"));
406 error(IO.mapInteger(Record.DerivationList, "DerivedFrom"));
407 error(IO.mapInteger(Record.VTableShape, "VShape"));
408 error(IO.mapEncodedInteger(Record.Size, "SizeOf"));
409 error(mapNameAndUniqueName(IO, Record.Name, Record.UniqueName,
417 getFlagNames(IO, static_cast<uint16_t>(Record.Options),
419 error(IO.mapInteger(Record.MemberCount, "MemberCount"));
420 error(IO.mapEnum(Record.Options, "Properties" + PropertiesNames));
421 error(IO.mapInteger(Record.FieldList, "FieldList"));
422 error(IO.mapEncodedInteger(Record.Size, "SizeOf"));
423 error(mapNameAndUniqueName(IO, Record.Name, Record.UniqueName,
431 getFlagNames(IO, static_cast<uint16_t>(Record.Options),
433 error(IO.mapInteger(Record.MemberCount, "NumEnumerators"));
434 error(IO.mapEnum(Record.Options, "Properties" + PropertiesNames));
435 error(IO.mapInteger(Record.UnderlyingType, "UnderlyingType"));
436 error(IO.mapInteger(Record.FieldList, "FieldListType"));
437 error(mapNameAndUniqueName(IO, Record.Name, Record.UniqueName,
444 error(IO.mapInteger(Record.Type, "Type"));
445 error(IO.mapInteger(Record.BitSize, "BitSize"));
446 error(IO.mapInteger(Record.BitOffset, "BitOffset"));
454 if (!IO.isReading()) {
457 error(IO.mapInteger(Size, "VFEntryCount"));
464 error(IO.mapInteger(Byte));
467 error(IO.mapInteger(Size));
470 error(IO.mapInteger(Byte));
481 error(IO.mapInteger(Record.CompleteClass, "CompleteClass"));
482 error(IO.mapInteger(Record.OverriddenVFTable, "OverriddenVFTable"));
483 error(IO.mapInteger(Record.VFPtrOffset, "VFPtrOffset"));
485 if (!IO.isReading()) {
489 error(IO.mapInteger(NamesLen));
490 error(IO.mapVectorTail(
492 [](CodeViewRecordIO &IO, StringRef &S) {
493 return IO.mapStringZ(S, "MethodName");
501 error(IO.mapInteger(Record.Id, "Id"));
502 error(IO.mapStringZ(Record.String, "StringData"));
509 error(IO.mapInteger(Record.UDT, "UDT"));
510 error(IO.mapInteger(Record.SourceFile, "SourceFile"));
511 error(IO.mapInteger(Record.LineNumber, "LineNumber"));
518 error(IO.mapInteger(Record.UDT, "UDT"));
519 error(IO.mapInteger(Record.SourceFile, "SourceFile"));
520 error(IO.mapInteger(Record.LineNumber, "LineNumber"));
521 error(IO.mapInteger(Record.Module, "Module"));
527 error(IO.mapInteger(Record.ParentScope, "ParentScope"));
528 error(IO.mapInteger(Record.FunctionType, "FunctionType"));
529 error(IO.mapStringZ(Record.Name, "Name"));
536 error(IO.mapInteger(Record.ClassType, "ClassType"));
537 error(IO.mapInteger(Record.FunctionType, "FunctionType"));
538 error(IO.mapStringZ(Record.Name, "Name"));
545 error(IO.mapVectorN<uint16_t>(
547 [](CodeViewRecordIO &IO, TypeIndex &N) {
548 return IO.mapInteger(N, "Argument");
559 error(IO.mapVectorTail(Record.Methods, MapOneMethodRecord(true), "Method"));
566 if (IO.isStreaming()) {
570 error(IO.mapByteVectorTail(Record.Data));
577 error(IO.mapGuid(Record.Guid, "Guid"));
578 error(IO.mapInteger(Record.Age, "Age"));
579 error(IO.mapStringZ(Record.Name, "Name"));
585 getEnumName(IO, uint16_t(Record.Mode), makeArrayRef(getLabelTypeEnum()));
586 error(IO.mapEnum(Record.Mode, "Mode: " + ModeName));
593 IO, Record.getAccess(), MethodKind::Vanilla, MethodOptions::None);
594 error(IO.mapInteger(Record.Attrs.Attrs, "Attrs: " + Attrs));
595 error(IO.mapInteger(Record.Type, "BaseType"));
596 error(IO.mapEncodedInteger(Record.Offset, "BaseOffset"));
604 IO, Record.getAccess(), MethodKind::Vanilla, MethodOptions::None);
605 error(IO.mapInteger(Record.Attrs.Attrs, "Attrs: " + Attrs));
608 error(IO.mapEncodedInteger(Record.Value, "EnumValue"));
609 error(IO.mapStringZ(Record.Name, "Name"));
617 IO, Record.getAccess(), MethodKind::Vanilla, MethodOptions::None);
618 error(IO.mapInteger(Record.Attrs.Attrs, "Attrs: " + Attrs));
619 error(IO.mapInteger(Record.Type, "Type"));
620 error(IO.mapEncodedInteger(Record.FieldOffset, "FieldOffset"));
621 error(IO.mapStringZ(Record.Name, "Name"));
628 error(IO.mapInteger(Record.NumOverloads, "MethodCount"));
629 error(IO.mapInteger(Record.MethodList, "MethodListIndex"));
630 error(IO.mapStringZ(Record.Name, "Name"));
639 return Mapper(IO, Record);
645 error(IO.mapInteger(Padding, "Padding"));
646 error(IO.mapInteger(Record.Type, "Type"));
647 error(IO.mapStringZ(Record.Name, "Name"));
656 IO, Record.getAccess(), MethodKind::Vanilla, MethodOptions::None);
657 error(IO.mapInteger(Record.Attrs.Attrs, "Attrs: " + Attrs));
658 error(IO.mapInteger(Record.Type, "Type"));
659 error(IO.mapStringZ(Record.Name, "Name"));
668 IO, Record.getAccess(), MethodKind::Vanilla, MethodOptions::None);
669 error(IO.mapInteger(Record.Attrs.Attrs, "Attrs: " + Attrs));
670 error(IO.mapInteger(Record.BaseType, "BaseType"));
671 error(IO.mapInteger(Record.VBPtrType, "VBPtrType"));
672 error(IO.mapEncodedInteger(Record.VBPtrOffset, "VBPtrOffset"));
673 error(IO.mapEncodedInteger(Record.VTableIndex, "VBTableIndex"));
681 error(IO.mapInteger(Padding, "Padding"));
682 error(IO.mapInteger(Record.Type, "Type"));
690 error(IO.mapInteger(Padding, "Padding"));
691 error(IO.mapInteger(Record.ContinuationIndex, "ContinuationIndex"));
698 error(IO.mapInteger(Precomp.StartTypeIndex, "StartIndex"));
699 error(IO.mapInteger(Precomp.TypesCount, "Count"));
700 error(IO.mapInteger(Precomp.Signature, "Signature"));
701 error(IO.mapStringZ(Precomp.PrecompFilePath, "PrecompFile"));
707 error(IO.mapInteger(EndPrecomp.Signature, "Signature"));