Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions clang/lib/AST/ByteCode/Disasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,28 @@ LLVM_DUMP_METHOD void Descriptor::dumpFull(unsigned Offset,

FO += ElemDesc->getAllocSize();
}
} else if (isPrimitiveArray()) {
OS.indent(Spaces) << "Elements: " << getNumElems() << '\n';
OS.indent(Spaces) << "Element type: " << primTypeToString(getPrimType())
<< '\n';
unsigned FO = Offset + sizeof(InitMapPtr);
for (unsigned I = 0; I != getNumElems(); ++I) {
OS.indent(Spaces) << "Element " << I << " offset: " << FO << '\n';
FO += getElemSize();
}
} else if (isRecord()) {
ElemRecord->dump(OS, Indent + 1, Offset);
unsigned I = 0;
for (const Record::Field &F : ElemRecord->fields()) {
OS.indent(Spaces) << "- Field " << I << ": ";
{
ColorScope SC(OS, true, {llvm::raw_ostream::BRIGHT_RED, true});
OS << F.Decl->getName();
}
OS << ". Offset " << (Offset + F.Offset) << "\n";
F.Desc->dumpFull(Offset + F.Offset, Indent + 1);
++I;
}
} else if (isPrimitive()) {
} else {
}
Expand Down