[llvm] r301204 - [llvm-pdbdump] Merge functionality of graphical and text dumpers.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 10:47:52 PDT 2017
Author: zturner
Date: Mon Apr 24 12:47:52 2017
New Revision: 301204
URL: http://llvm.org/viewvc/llvm-project?rev=301204&view=rev
Log:
[llvm-pdbdump] Merge functionality of graphical and text dumpers.
The *real* difference between these two was that
a) The "graphical" dumper could recurse, while the text one could
not.
b) The "text" dumper could display nested types and functions,
while the graphical one could not.
Merge these two so that there is only one dumper that can recurse
arbitrarily deep and optionally display nested types or not.
Removed:
llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.cpp
llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.h
Modified:
llvm/trunk/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.cpp
llvm/trunk/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.pdb
llvm/trunk/test/tools/llvm-pdbdump/class-layout.test
llvm/trunk/test/tools/llvm-pdbdump/complex-padding-graphical.test
llvm/trunk/test/tools/llvm-pdbdump/simple-padding-graphical.test
llvm/trunk/tools/llvm-pdbdump/CMakeLists.txt
llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.cpp
llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h
llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.cpp
llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.h
llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.h
Modified: llvm/trunk/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.cpp?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.cpp (original)
+++ llvm/trunk/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.cpp Mon Apr 24 12:47:52 2017
@@ -114,6 +114,7 @@ struct SimplePadAggregate {
NonEmptyBase1 X;
int32_t Y;
// the presence of X will cause 3 bytes of padding to be injected.
+ SimplePadFields1 Fields;
} N;
struct SimplePadVtable1 {
Modified: llvm/trunk/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.pdb
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.pdb?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
Binary files - no diff available.
Modified: llvm/trunk/test/tools/llvm-pdbdump/class-layout.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-pdbdump/class-layout.test?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-pdbdump/class-layout.test (original)
+++ llvm/trunk/test/tools/llvm-pdbdump/class-layout.test Mon Apr 24 12:47:52 2017
@@ -1,4 +1,5 @@
-; RUN: llvm-pdbdump pretty -all %p/Inputs/ClassLayoutTest.pdb > %t
+; RUN: llvm-pdbdump pretty -all -class-recurse-depth=1 \
+; RUN: %p/Inputs/ClassLayoutTest.pdb > %t
; RUN: FileCheck -input-file=%t %s -check-prefix=GLOBALS_TEST
; RUN: FileCheck -input-file=%t %s -check-prefix=MEMBERS_TEST
; RUN: FileCheck -input-file=%t %s -check-prefix=BASE_CLASS_A
Modified: llvm/trunk/test/tools/llvm-pdbdump/complex-padding-graphical.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-pdbdump/complex-padding-graphical.test?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-pdbdump/complex-padding-graphical.test (original)
+++ llvm/trunk/test/tools/llvm-pdbdump/complex-padding-graphical.test Mon Apr 24 12:47:52 2017
@@ -1,4 +1,4 @@
-; RUN: llvm-pdbdump pretty -classes -class-definitions=graphical \
+; RUN: llvm-pdbdump pretty -classes -class-definitions=layout \
; RUN: -include-types=Test %p/Inputs/ComplexPaddingTest.pdb > %t
; RUN: FileCheck -input-file=%t %s -check-prefix=DIRECT_VB_ONLY
Modified: llvm/trunk/test/tools/llvm-pdbdump/simple-padding-graphical.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-pdbdump/simple-padding-graphical.test?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-pdbdump/simple-padding-graphical.test (original)
+++ llvm/trunk/test/tools/llvm-pdbdump/simple-padding-graphical.test Mon Apr 24 12:47:52 2017
@@ -1,4 +1,4 @@
-; RUN: llvm-pdbdump pretty -classes -class-definitions=graphical \
+; RUN: llvm-pdbdump pretty -classes -class-definitions=layout \
; RUN: -include-types=SimplePad %p/Inputs/SimplePaddingTest.pdb > %t
; RUN: FileCheck -input-file=%t %s -check-prefix=NO_PADDING
@@ -112,9 +112,14 @@
; DEEP_INHERIT-NEXT: }
-; AGGREGATE: struct SimplePadAggregate [sizeof = 8] {
+; AGGREGATE: struct SimplePadAggregate [sizeof = 12] {
; AGGREGATE-NEXT: data +0x00 [sizeof=1] NonEmptyBase1 X
; AGGREGATE-NEXT: data +0x00 [sizeof=1] bool X
; AGGREGATE-NEXT: <padding> (3 bytes)
; AGGREGATE-NEXT: data +0x04 [sizeof=4] int Y
+; AGGREGATE-NEXT: data +0x08 [sizeof=4] SimplePadFields1 Fields
+; AGGREGATE-NEXT: data +0x08 [sizeof=1] char A
+; AGGREGATE-NEXT: data +0x09 [sizeof=1] char B
+; AGGREGATE-NEXT: data +0x0a [sizeof=1] char C
+; AGGREGATE-NEXT: <padding> (1 bytes)
; AGGREGATE-NEXT: }
Modified: llvm/trunk/tools/llvm-pdbdump/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/CMakeLists.txt?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-pdbdump/CMakeLists.txt Mon Apr 24 12:47:52 2017
@@ -18,7 +18,6 @@ add_llvm_tool(llvm-pdbdump
PdbYaml.cpp
PrettyBuiltinDumper.cpp
PrettyClassDefinitionDumper.cpp
- PrettyClassLayoutTextDumper.cpp
PrettyClassLayoutGraphicalDumper.cpp
PrettyCompilandDumper.cpp
PrettyEnumDumper.cpp
Modified: llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.cpp?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.cpp Mon Apr 24 12:47:52 2017
@@ -11,7 +11,6 @@
#include "LinePrinter.h"
#include "PrettyClassLayoutGraphicalDumper.h"
-#include "PrettyClassLayoutTextDumper.h"
#include "llvm-pdbdump.h"
#include "llvm/ADT/APFloat.h"
@@ -39,21 +38,8 @@ void ClassDefinitionDumper::start(const
void ClassDefinitionDumper::start(const ClassLayout &Layout) {
prettyPrintClassIntro(Layout);
- switch (opts::pretty::ClassFormat) {
- case opts::pretty::ClassDefinitionFormat::Graphical: {
- PrettyClassLayoutGraphicalDumper Dumper(Printer, 0);
- DumpedAnything = Dumper.start(Layout);
- break;
- }
- case opts::pretty::ClassDefinitionFormat::Standard:
- case opts::pretty::ClassDefinitionFormat::Layout: {
- PrettyClassLayoutTextDumper Dumper(Printer);
- DumpedAnything |= Dumper.start(Layout);
- break;
- }
- default:
- llvm_unreachable("Unreachable!");
- }
+ PrettyClassLayoutGraphicalDumper Dumper(Printer, 1, 0);
+ DumpedAnything |= Dumper.start(Layout);
prettyPrintClassOutro(Layout);
}
Modified: llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h (original)
+++ llvm/trunk/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h Mon Apr 24 12:47:52 2017
@@ -39,8 +39,8 @@ private:
void prettyPrintClassIntro(const ClassLayout &Class);
void prettyPrintClassOutro(const ClassLayout &Class);
- bool DumpedAnything = false;
LinePrinter &Printer;
+ bool DumpedAnything = false;
};
}
}
Modified: llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.cpp?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.cpp Mon Apr 24 12:47:52 2017
@@ -11,7 +11,12 @@
#include "LinePrinter.h"
#include "PrettyClassDefinitionDumper.h"
+#include "PrettyEnumDumper.h"
+#include "PrettyFunctionDumper.h"
+#include "PrettyTypedefDumper.h"
#include "PrettyVariableDumper.h"
+#include "PrettyVariableDumper.h"
+#include "llvm-pdbdump.h"
#include "llvm/DebugInfo/PDB/PDBSymbolData.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h"
@@ -23,11 +28,20 @@ using namespace llvm;
using namespace llvm::pdb;
PrettyClassLayoutGraphicalDumper::PrettyClassLayoutGraphicalDumper(
- LinePrinter &P, uint32_t InitialOffset)
- : PDBSymDumper(true), Printer(P), ClassOffsetZero(InitialOffset),
- CurrentAbsoluteOffset(InitialOffset) {}
+ LinePrinter &P, uint32_t RecurseLevel, uint32_t InitialOffset)
+ : PDBSymDumper(true), Printer(P), RecursionLevel(RecurseLevel),
+ ClassOffsetZero(InitialOffset), CurrentAbsoluteOffset(InitialOffset) {}
bool PrettyClassLayoutGraphicalDumper::start(const UDTLayoutBase &Layout) {
+
+ if (RecursionLevel == 1 &&
+ opts::pretty::ClassFormat == opts::pretty::ClassDefinitionFormat::All) {
+ for (auto &Other : Layout.other_items())
+ Other->dump(*this);
+ for (auto &Func : Layout.funcs())
+ Func->dump(*this);
+ }
+
const BitVector &UseMap = Layout.usedBytes();
int NextPaddingByte = UseMap.find_first_unset();
@@ -72,10 +86,12 @@ bool PrettyClassLayoutGraphicalDumper::s
auto TailPadding = Layout.tailPadding();
if (TailPadding > 0) {
- Printer.NewLine();
- WithColor(Printer, PDB_ColorItem::Padding).get() << "<padding> ("
- << TailPadding << " bytes)";
- DumpedAnything = true;
+ if (TailPadding != 1 || Layout.getSize() != 1) {
+ Printer.NewLine();
+ WithColor(Printer, PDB_ColorItem::Padding).get()
+ << "<padding> (" << TailPadding << " bytes)";
+ DumpedAnything = true;
+ }
}
return DumpedAnything;
@@ -114,15 +130,25 @@ void PrettyClassLayoutGraphicalDumper::d
WithColor(Printer, PDB_ColorItem::Identifier).get() << Layout.getName();
- Printer.Indent();
- uint32_t ChildOffsetZero = ClassOffsetZero + Layout.getOffsetInParent();
- PrettyClassLayoutGraphicalDumper BaseDumper(Printer, ChildOffsetZero);
- BaseDumper.start(Layout);
- Printer.Unindent();
+ if (shouldRecurse()) {
+ Printer.Indent();
+ uint32_t ChildOffsetZero = ClassOffsetZero + Layout.getOffsetInParent();
+ PrettyClassLayoutGraphicalDumper BaseDumper(Printer, RecursionLevel + 1,
+ ChildOffsetZero);
+ DumpedAnything |= BaseDumper.start(Layout);
+ Printer.Unindent();
+ }
DumpedAnything = true;
}
+bool PrettyClassLayoutGraphicalDumper::shouldRecurse() const {
+ uint32_t Limit = opts::pretty::ClassRecursionDepth;
+ if (Limit == 0)
+ return true;
+ return RecursionLevel < Limit;
+}
+
void PrettyClassLayoutGraphicalDumper::dump(const PDBSymbolData &Symbol) {
assert(CurrentItem != nullptr);
@@ -132,9 +158,11 @@ void PrettyClassLayoutGraphicalDumper::d
VariableDumper VarDumper(Printer);
VarDumper.start(Symbol, ClassOffsetZero);
- if (Layout.hasUDTLayout()) {
+ if (Layout.hasUDTLayout() && shouldRecurse()) {
+ uint32_t ChildOffsetZero = ClassOffsetZero + Layout.getOffsetInParent();
Printer.Indent();
- PrettyClassLayoutGraphicalDumper TypeDumper(Printer, ClassOffsetZero);
+ PrettyClassLayoutGraphicalDumper TypeDumper(Printer, RecursionLevel + 1,
+ ChildOffsetZero);
TypeDumper.start(Layout.getUDTLayout());
Printer.Unindent();
}
@@ -150,3 +178,38 @@ void PrettyClassLayoutGraphicalDumper::d
DumpedAnything = true;
}
+
+void PrettyClassLayoutGraphicalDumper::dump(const PDBSymbolTypeEnum &Symbol) {
+ DumpedAnything = true;
+ Printer.NewLine();
+ EnumDumper Dumper(Printer);
+ Dumper.start(Symbol);
+}
+
+void PrettyClassLayoutGraphicalDumper::dump(
+ const PDBSymbolTypeTypedef &Symbol) {
+ DumpedAnything = true;
+ Printer.NewLine();
+ TypedefDumper Dumper(Printer);
+ Dumper.start(Symbol);
+}
+
+void PrettyClassLayoutGraphicalDumper::dump(
+ const PDBSymbolTypeBuiltin &Symbol) {}
+
+void PrettyClassLayoutGraphicalDumper::dump(const PDBSymbolTypeUDT &Symbol) {}
+
+void PrettyClassLayoutGraphicalDumper::dump(const PDBSymbolFunc &Symbol) {
+ if (Printer.IsSymbolExcluded(Symbol.getName()))
+ return;
+ if (Symbol.isCompilerGenerated() && opts::pretty::ExcludeCompilerGenerated)
+ return;
+ if (Symbol.getLength() == 0 && !Symbol.isPureVirtual() &&
+ !Symbol.isIntroVirtualFunction())
+ return;
+
+ DumpedAnything = true;
+ Printer.NewLine();
+ FunctionDumper Dumper(Printer);
+ Dumper.start(Symbol, FunctionDumper::PointerType::None);
+}
Modified: llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.h?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.h (original)
+++ llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.h Mon Apr 24 12:47:52 2017
@@ -24,20 +24,31 @@ class LinePrinter;
class PrettyClassLayoutGraphicalDumper : public PDBSymDumper {
public:
- PrettyClassLayoutGraphicalDumper(LinePrinter &P, uint32_t InitialOffset);
+ PrettyClassLayoutGraphicalDumper(LinePrinter &P, uint32_t RecurseLevel,
+ uint32_t InitialOffset);
bool start(const UDTLayoutBase &Layout);
+ // Layout based symbol types.
void dump(const PDBSymbolTypeBaseClass &Symbol) override;
void dump(const PDBSymbolData &Symbol) override;
void dump(const PDBSymbolTypeVTable &Symbol) override;
+ // Non layout-based symbol types.
+ void dump(const PDBSymbolTypeEnum &Symbol) override;
+ void dump(const PDBSymbolFunc &Symbol) override;
+ void dump(const PDBSymbolTypeTypedef &Symbol) override;
+ void dump(const PDBSymbolTypeUDT &Symbol) override;
+ void dump(const PDBSymbolTypeBuiltin &Symbol) override;
+
private:
+ bool shouldRecurse() const;
void printPaddingRow(uint32_t Amount);
LinePrinter &Printer;
LayoutItemBase *CurrentItem = nullptr;
+ uint32_t RecursionLevel = 0;
uint32_t ClassOffsetZero = 0;
uint32_t CurrentAbsoluteOffset = 0;
bool DumpedAnything = false;
Removed: llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.cpp?rev=301203&view=auto
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.cpp (removed)
@@ -1,124 +0,0 @@
-//===- PrettyClassLayoutTextDumper.cpp --------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "PrettyClassLayoutTextDumper.h"
-
-#include "LinePrinter.h"
-#include "PrettyEnumDumper.h"
-#include "PrettyFunctionDumper.h"
-#include "PrettyTypedefDumper.h"
-#include "PrettyVariableDumper.h"
-#include "llvm-pdbdump.h"
-
-#include "llvm/DebugInfo/PDB/IPDBSession.h"
-#include "llvm/DebugInfo/PDB/PDBExtras.h"
-#include "llvm/DebugInfo/PDB/PDBSymbolData.h"
-#include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
-#include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
-#include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h"
-#include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"
-#include "llvm/DebugInfo/PDB/UDTLayout.h"
-
-#include "llvm/Support/Format.h"
-
-using namespace llvm;
-using namespace llvm::pdb;
-
-PrettyClassLayoutTextDumper::PrettyClassLayoutTextDumper(LinePrinter &P)
- : PDBSymDumper(true), Printer(P) {}
-
-bool PrettyClassLayoutTextDumper::start(const ClassLayout &Layout) {
- if (opts::pretty::ClassFormat ==
- opts::pretty::ClassDefinitionFormat::Standard) {
- for (auto &Other : Layout.other_items())
- Other->dump(*this);
- for (auto &Func : Layout.funcs())
- Func->dump(*this);
- }
-
- const BitVector &UseMap = Layout.usedBytes();
- int NextUnusedByte = Layout.usedBytes().find_first_unset();
- // Next dump items which affect class layout.
- for (auto &LayoutItem : Layout.layout_items()) {
- if (NextUnusedByte >= 0) {
- // If there are padding bytes remaining, see if this field is the first to
- // cross a padding boundary, and print a padding field indicator if so.
- int Off = LayoutItem->getOffsetInParent();
- if (Off > NextUnusedByte) {
- uint32_t Amount = Off - NextUnusedByte;
- Printer.NewLine();
- WithColor(Printer, PDB_ColorItem::Padding).get() << "<padding> ("
- << Amount << " bytes)";
- assert(UseMap.find_next(NextUnusedByte) == Off);
- NextUnusedByte = UseMap.find_next_unset(Off);
- }
- }
- if (auto Sym = LayoutItem->getSymbol())
- Sym->dump(*this);
- }
-
- if (NextUnusedByte >= 0 && Layout.getSize() > 1) {
- uint32_t Amount = Layout.getSize() - NextUnusedByte;
- if (Amount > 0) {
- Printer.NewLine();
- WithColor(Printer, PDB_ColorItem::Padding).get() << "<padding> ("
- << Amount << " bytes)";
- }
- DumpedAnything = true;
- }
-
- return DumpedAnything;
-}
-
-void PrettyClassLayoutTextDumper::dump(const PDBSymbolTypeBaseClass &Symbol) {}
-
-void PrettyClassLayoutTextDumper::dump(const PDBSymbolData &Symbol) {
- VariableDumper Dumper(Printer);
- Dumper.start(Symbol);
- DumpedAnything = true;
-}
-
-void PrettyClassLayoutTextDumper::dump(const PDBSymbolFunc &Symbol) {
- if (Printer.IsSymbolExcluded(Symbol.getName()))
- return;
- if (Symbol.isCompilerGenerated() && opts::pretty::ExcludeCompilerGenerated)
- return;
- if (Symbol.getLength() == 0 && !Symbol.isPureVirtual() &&
- !Symbol.isIntroVirtualFunction())
- return;
-
- DumpedAnything = true;
- Printer.NewLine();
- FunctionDumper Dumper(Printer);
- Dumper.start(Symbol, FunctionDumper::PointerType::None);
-}
-
-void PrettyClassLayoutTextDumper::dump(const PDBSymbolTypeVTable &Symbol) {
- VariableDumper Dumper(Printer);
- Dumper.start(Symbol);
- DumpedAnything = true;
-}
-
-void PrettyClassLayoutTextDumper::dump(const PDBSymbolTypeEnum &Symbol) {
- DumpedAnything = true;
- Printer.NewLine();
- EnumDumper Dumper(Printer);
- Dumper.start(Symbol);
-}
-
-void PrettyClassLayoutTextDumper::dump(const PDBSymbolTypeTypedef &Symbol) {
- DumpedAnything = true;
- Printer.NewLine();
- TypedefDumper Dumper(Printer);
- Dumper.start(Symbol);
-}
-
-void PrettyClassLayoutTextDumper::dump(const PDBSymbolTypeBuiltin &Symbol) {}
-
-void PrettyClassLayoutTextDumper::dump(const PDBSymbolTypeUDT &Symbol) {}
Removed: llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.h?rev=301203&view=auto
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.h (original)
+++ llvm/trunk/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.h (removed)
@@ -1,45 +0,0 @@
-//===- PrettyClassLayoutTextDumper.h ----------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTTEXTDUMPER_H
-#define LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTTEXTDUMPER_H
-
-#include "llvm/ADT/BitVector.h"
-
-#include "llvm/DebugInfo/PDB/PDBSymDumper.h"
-
-namespace llvm {
-
-namespace pdb {
-
-class ClassLayout;
-class LinePrinter;
-
-class PrettyClassLayoutTextDumper : public PDBSymDumper {
-public:
- PrettyClassLayoutTextDumper(LinePrinter &P);
-
- bool start(const ClassLayout &Layout);
-
- void dump(const PDBSymbolTypeBaseClass &Symbol) override;
- void dump(const PDBSymbolData &Symbol) override;
- void dump(const PDBSymbolTypeEnum &Symbol) override;
- void dump(const PDBSymbolFunc &Symbol) override;
- void dump(const PDBSymbolTypeTypedef &Symbol) override;
- void dump(const PDBSymbolTypeUDT &Symbol) override;
- void dump(const PDBSymbolTypeVTable &Symbol) override;
- void dump(const PDBSymbolTypeBuiltin &Symbol) override;
-
-private:
- bool DumpedAnything = false;
- LinePrinter &Printer;
-};
-}
-}
-#endif
Modified: llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp Mon Apr 24 12:47:52 2017
@@ -137,18 +137,19 @@ cl::opt<ClassSortMode> ClassOrder(
cl::opt<ClassDefinitionFormat> ClassFormat(
"class-definitions", cl::desc("Class definition format"),
- cl::init(ClassDefinitionFormat::Standard),
+ cl::init(ClassDefinitionFormat::All),
cl::values(
- clEnumValN(ClassDefinitionFormat::Standard, "all-members",
+ clEnumValN(ClassDefinitionFormat::All, "all",
"Display all class members including data, constants, "
"typedefs, functions, etc"),
- clEnumValN(ClassDefinitionFormat::Layout, "layout-members",
+ clEnumValN(ClassDefinitionFormat::Layout, "layout",
"Only display members that contribute to class size."),
- clEnumValN(ClassDefinitionFormat::Graphical, "graphical",
- "Display graphical representation of each class's layout."),
clEnumValN(ClassDefinitionFormat::None, "none",
"Don't display class definitions")),
cl::cat(TypeCategory), cl::sub(PrettySubcommand));
+cl::opt<uint32_t> ClassRecursionDepth(
+ "class-recurse-depth", cl::desc("Class recursion depth (0=no limit)"),
+ cl::init(0), cl::cat(TypeCategory), cl::sub(PrettySubcommand));
cl::opt<bool> Lines("lines", cl::desc("Line tables"), cl::cat(TypeCategory),
cl::sub(PrettySubcommand));
Modified: llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.h?rev=301204&r1=301203&r2=301204&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.h (original)
+++ llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.h Mon Apr 24 12:47:52 2017
@@ -18,7 +18,7 @@ namespace opts {
namespace pretty {
-enum class ClassDefinitionFormat { None, Layout, Graphical, Standard };
+enum class ClassDefinitionFormat { None, Layout, All };
enum class ClassSortMode { None, Name, Size, Padding, PaddingPct };
extern llvm::cl::opt<bool> Compilands;
@@ -41,6 +41,7 @@ extern llvm::cl::opt<ClassSortMode> Clas
extern llvm::cl::opt<uint32_t> SizeThreshold;
extern llvm::cl::opt<uint32_t> PaddingThreshold;
extern llvm::cl::opt<ClassDefinitionFormat> ClassFormat;
+extern llvm::cl::opt<uint32_t> ClassRecursionDepth;
}
namespace raw {
More information about the llvm-commits
mailing list