예제 #1
0
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);
}
예제 #2
0
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();
}
예제 #3
0
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();
}
예제 #4
0
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);
}