Skip to content

Commit

Permalink
[clang][Interp][NFC] Print virtual bases in Record::dump()
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Apr 26, 2024
1 parent 88a733f commit c2db883
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions clang/lib/AST/Interp/Disasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ LLVM_DUMP_METHOD void Record::dump(llvm::raw_ostream &OS, unsigned Indentation,
++I;
}

// FIXME: Virtual bases.

I = 0;
for (const Record::Field &F : fields()) {
OS.indent(Indent) << "- Field " << I << ": ";
Expand All @@ -282,6 +280,14 @@ LLVM_DUMP_METHOD void Record::dump(llvm::raw_ostream &OS, unsigned Indentation,
OS << ". Offset " << (Offset + F.Offset) << "\n";
++I;
}

I = 0;
for (const Record::Base &B : virtual_bases()) {
OS.indent(Indent) << "- Virtual Base " << I << ". Offset "
<< (Offset + B.Offset) << "\n";
B.R->dump(OS, Indentation + 1, Offset + B.Offset);
++I;
}
}

LLVM_DUMP_METHOD void Block::dump(llvm::raw_ostream &OS) const {
Expand Down

0 comments on commit c2db883

Please sign in to comment.