TypeIndex TypeTableBuilder::writeKnownType(const ArgListRecord &Record) { TypeRecordBuilder Builder(Record.getKind()); Builder.writeUInt32(Record.getIndices().size()); for (TypeIndex TI : Record.getIndices()) { Builder.writeTypeIndex(TI); } return writeRecord(Builder); }
Error TypeDumpVisitor::visitKnownRecord(CVType &CVR, ArgListRecord &Args) { auto Indices = Args.getIndices(); uint32_t Size = Indices.size(); W->printNumber("NumArgs", Size); ListScope Arguments(*W, "Arguments"); for (uint32_t I = 0; I < Size; ++I) { printTypeIndex("ArgType", Indices[I]); } return Error::success(); }
Error TypeNameComputer::visitKnownRecord(CVType &CVR, ArgListRecord &Args) { auto Indices = Args.getIndices(); uint32_t Size = Indices.size(); Name = "("; for (uint32_t I = 0; I < Size; ++I) { assert(Indices[I] < CurrentTypeIndex); Name.append(Types.getTypeName(Indices[I])); if (I + 1 != Size) Name.append(", "); } Name.push_back(')'); return Error::success(); }
void CVTypeDumperImpl::visitArgList(TypeLeafKind Leaf, ArgListRecord &Args) { auto Indices = Args.getIndices(); uint32_t Size = Indices.size(); W.printNumber("NumArgs", Size); ListScope Arguments(W, "Arguments"); SmallString<256> TypeName("("); for (uint32_t I = 0; I < Size; ++I) { printTypeIndex("ArgType", Indices[I]); StringRef ArgTypeName = getTypeName(Indices[I]); TypeName.append(ArgTypeName); if (I + 1 != Size) TypeName.append(", "); } TypeName.push_back(')'); Name = CVTD.saveName(TypeName); }