summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbdump/ClassDefinitionDumper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-pdbdump/ClassDefinitionDumper.cpp')
-rw-r--r--llvm/tools/llvm-pdbdump/ClassDefinitionDumper.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/llvm/tools/llvm-pdbdump/ClassDefinitionDumper.cpp b/llvm/tools/llvm-pdbdump/ClassDefinitionDumper.cpp
index 20e3fc4c795..5db33a82457 100644
--- a/llvm/tools/llvm-pdbdump/ClassDefinitionDumper.cpp
+++ b/llvm/tools/llvm-pdbdump/ClassDefinitionDumper.cpp
@@ -33,8 +33,29 @@ ClassDefinitionDumper::ClassDefinitionDumper(LinePrinter &P)
void ClassDefinitionDumper::start(const PDBSymbolTypeUDT &Class) {
std::string Name = Class.getName();
- WithColor(Printer, PDB_ColorItem::Keyword).get() << "class ";
+ WithColor(Printer, PDB_ColorItem::Keyword).get() << Class.getUdtKind() << " ";
WithColor(Printer, PDB_ColorItem::Type).get() << Class.getName();
+
+ auto Bases = Class.findAllChildren<PDBSymbolTypeBaseClass>();
+ if (Bases->getChildCount() > 0) {
+ Printer.Indent();
+ Printer.NewLine();
+ Printer << ":";
+ uint32_t BaseIndex = 0;
+ while (auto Base = Bases->getNext()) {
+ Printer << " ";
+ WithColor(Printer, PDB_ColorItem::Keyword).get() << Base->getAccess();
+ if (Base->isVirtualBaseClass())
+ WithColor(Printer, PDB_ColorItem::Keyword).get() << " virtual";
+ WithColor(Printer, PDB_ColorItem::Type).get() << " " << Base->getName();
+ if (++BaseIndex < Bases->getChildCount()) {
+ Printer.NewLine();
+ Printer << ",";
+ }
+ }
+ Printer.Unindent();
+ }
+
Printer << " {";
auto Children = Class.findAllChildren();
if (Children->getChildCount() == 0) {
@@ -62,9 +83,10 @@ void ClassDefinitionDumper::start(const PDBSymbolTypeUDT &Class) {
auto &AccessGroup = Groups.find((int)Access)->second;
if (auto Func = dyn_cast<PDBSymbolFunc>(Child.get())) {
- if (Func->isCompilerGenerated())
+ if (Func->isCompilerGenerated() && opts::ExcludeCompilerGenerated)
continue;
- if (Func->getLength() == 0 && !Func->isPureVirtual())
+ if (Func->getLength() == 0 && !Func->isPureVirtual() &&
+ !Func->isIntroVirtualFunction())
continue;
Child.release();
AccessGroup.Functions.push_back(std::unique_ptr<PDBSymbolFunc>(Func));
OpenPOWER on IntegriCloud