예제 #1
0
TypeIndex TypeTableBuilder::writeKnownType(const VFTableShapeRecord &Record) {
  TypeRecordBuilder Builder(Record.getKind());

  ArrayRef<VFTableSlotKind> Slots = Record.getSlots();

  Builder.writeUInt16(Slots.size());
  for (size_t SlotIndex = 0; SlotIndex < Slots.size(); SlotIndex += 2) {
    uint8_t Byte = static_cast<uint8_t>(Slots[SlotIndex]) << 4;
    if ((SlotIndex + 1) < Slots.size()) {
      Byte |= static_cast<uint8_t>(Slots[SlotIndex + 1]);
    }
    Builder.writeUInt8(Byte);
  }

  return writeRecord(Builder);
}
예제 #2
0
Error TypeNameComputer::visitKnownRecord(CVType &CVR,
                                         VFTableShapeRecord &Shape) {
  Name = formatv("<vftable {0} methods>", Shape.getEntryCount());
  return Error::success();
}
예제 #3
0
void CVTypeDumperImpl::visitVFTableShape(TypeLeafKind Leaf,
        VFTableShapeRecord &Shape) {
    W.printNumber("VFEntryCount", Shape.getEntryCount());
}
예제 #4
0
Error TypeDumpVisitor::visitKnownRecord(CVType &CVR,
                                        VFTableShapeRecord &Shape) {
  W->printNumber("VFEntryCount", Shape.getEntryCount());
  return Error::success();
}