]> granicus.if.org Git - llvm/commitdiff
[llvm-pdbdump] Merge functionality of graphical and text dumpers.
authorZachary Turner <zturner@google.com>
Mon, 24 Apr 2017 17:47:52 +0000 (17:47 +0000)
committerZachary Turner <zturner@google.com>
Mon, 24 Apr 2017 17:47:52 +0000 (17:47 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301204 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.cpp
test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.pdb
test/tools/llvm-pdbdump/class-layout.test
test/tools/llvm-pdbdump/complex-padding-graphical.test
test/tools/llvm-pdbdump/simple-padding-graphical.test
tools/llvm-pdbdump/CMakeLists.txt
tools/llvm-pdbdump/PrettyClassDefinitionDumper.cpp
tools/llvm-pdbdump/PrettyClassDefinitionDumper.h
tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.cpp
tools/llvm-pdbdump/PrettyClassLayoutGraphicalDumper.h
tools/llvm-pdbdump/PrettyClassLayoutTextDumper.cpp [deleted file]
tools/llvm-pdbdump/PrettyClassLayoutTextDumper.h [deleted file]
tools/llvm-pdbdump/llvm-pdbdump.cpp
tools/llvm-pdbdump/llvm-pdbdump.h

index b52af1495336aa8a18bb3964ac987d3e6da6a3cf..bb327ec1c411a9a067c32854cd91e9349d4288fc 100644 (file)
@@ -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 {
index f0bd496c1c8552b007ab1839892b02b9fb2ffeae..f19c00660a73bc4a09deacfe9499c4dbb9388ff8 100644 (file)
Binary files a/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.pdb and b/test/tools/llvm-pdbdump/Inputs/SimplePaddingTest.pdb differ
index ef5eb49af904daf2e6293077f970b5a22ac4751f..4a69c17db2baa414d4442583bd3d68c03dede140 100644 (file)
@@ -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
index 82881226e66b14f2ccd1fe0610222609a86bc709..a23321fe01244fabf009266db311af7a0b05aa9e 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-pdbdump pretty -classes -class-definitions=graphical \\r
+; RUN: llvm-pdbdump pretty -classes -class-definitions=layout \\r
 ; RUN:     -include-types=Test %p/Inputs/ComplexPaddingTest.pdb > %t\r
 \r
 ; RUN: FileCheck -input-file=%t %s -check-prefix=DIRECT_VB_ONLY\r
index 222349e75b0d2973f74364f2cde413da21ea43ed..0e19f9cc70181fe69515a85dac3b521f179b63d6 100644 (file)
@@ -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
 ; 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: }
index 37c76ab697b463851881e5410e5b94b8d5ca258c..e3d7b2ef275e44acb74b92fc93cc17837d70d3b8 100644 (file)
@@ -18,7 +18,6 @@ add_llvm_tool(llvm-pdbdump
   PdbYaml.cpp
   PrettyBuiltinDumper.cpp
   PrettyClassDefinitionDumper.cpp
-  PrettyClassLayoutTextDumper.cpp
   PrettyClassLayoutGraphicalDumper.cpp
   PrettyCompilandDumper.cpp
   PrettyEnumDumper.cpp
index 81ef26167a2666c2518d844509f04cdda2199ce4..c6d71e8e8e56927c505e43c8c261d146e46096de 100644 (file)
@@ -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 PDBSymbolTypeUDT &Class) {
 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);
 }
index 0e27733b3ccb9630d4f28436fe2431d393a18f01..6569a1d304f6c68f26d9148c144b26249d1fe570 100644 (file)
@@ -39,8 +39,8 @@ private:
   void prettyPrintClassIntro(const ClassLayout &Class);
   void prettyPrintClassOutro(const ClassLayout &Class);
 
-  bool DumpedAnything = false;
   LinePrinter &Printer;
+  bool DumpedAnything = false;
 };
 }
 }
index f0385f198e0de91a06e7bb361d03da724878a8fb..16cec82f718a84030f958701193e7b445669ef35 100644 (file)
 
 #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::start(const UDTLayoutBase &Layout) {
 
   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::dump(
 
   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::dump(const PDBSymbolData &Symbol) {
   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::dump(const PDBSymbolTypeVTable &Symbol) {
 
   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);
+}
index 61b62b1762a15eec00076e8d1ddb67a92750b70c..f83f1a6c1b34fae6ce7e17633e98c725ee0f103a 100644 (file)
@@ -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;
diff --git a/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.cpp b/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.cpp
deleted file mode 100644 (file)
index ccfd38c..0000000
+++ /dev/null
@@ -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) {}
diff --git a/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.h b/tools/llvm-pdbdump/PrettyClassLayoutTextDumper.h
deleted file mode 100644 (file)
index 1adbbff..0000000
+++ /dev/null
@@ -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
index d51f64065d674a18bf0d95677b4b8010146770c3..172e29ac7f3292967eb2d20a5b2ef5ceea482a5f 100644 (file)
@@ -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));
index f77124de0baabfe1004a9e064755eb52b4b25adc..1bfba3518a59ba41fd73aec7714f4ed92a7252b9 100644 (file)
@@ -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> ClassOrder;
 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 {