[llvm-pdbdump] Add an option to dump full class definitions.

This adds the --class-definitions flag.  If specified, when dumping
types, instead of "class Foo" you will see the full class definition,
with member functions, constructors, access specifiers.

NOTE: Using this option can be very slow, as generating a full class
definition requires accessing many different parts of the PDB.

llvm-svn: 230203
diff --git a/llvm/tools/llvm-pdbdump/CompilandDumper.cpp b/llvm/tools/llvm-pdbdump/CompilandDumper.cpp
index ee55228..852ddfa 100644
--- a/llvm/tools/llvm-pdbdump/CompilandDumper.cpp
+++ b/llvm/tools/llvm-pdbdump/CompilandDumper.cpp
@@ -75,26 +75,11 @@
 
 void CompilandDumper::dump(const PDBSymbolFunc &Symbol, raw_ostream &OS,
                            int Indent) {
-  uint32_t FuncStart = Symbol.getRelativeVirtualAddress();
-  uint32_t FuncEnd = FuncStart + Symbol.getLength();
-  OS << newline(Indent) << "func [" << format_hex(FuncStart, 8);
-  if (auto DebugStart = Symbol.findOneChild<PDBSymbolFuncDebugStart>())
-    OS << "+" << DebugStart->getRelativeVirtualAddress() - FuncStart;
-  OS << " - " << format_hex(FuncEnd, 8);
-  if (auto DebugEnd = Symbol.findOneChild<PDBSymbolFuncDebugEnd>())
-    OS << "-" << FuncEnd - DebugEnd->getRelativeVirtualAddress();
-  OS << "] ";
-
-  if (Symbol.hasFramePointer())
-    OS << "(" << Symbol.getLocalBasePointerRegisterId() << ")";
-  else
-    OS << "(FPO)";
-
-  OS << " ";
+  if (Symbol.getLength() == 0)
+    return;
 
   FunctionDumper Dumper;
-  Dumper.start(Symbol, OS);
-  OS.flush();
+  Dumper.start(Symbol, FunctionDumper::PointerType::None, OS, Indent);
 }
 
 void CompilandDumper::dump(const PDBSymbolLabel &Symbol, raw_ostream &OS,