[llvm] r229330 - llvm-pdbdump: Add flags controlling the type of values to dump.

Zachary Turner zturner at google.com
Sun Feb 15 12:27:55 PST 2015


Author: zturner
Date: Sun Feb 15 14:27:53 2015
New Revision: 229330

URL: http://llvm.org/viewvc/llvm-project?rev=229330&view=rev
Log:
llvm-pdbdump: Add flags controlling the type of values to dump.

Modified:
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolData.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolExe.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h
    llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h
    llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolBlock.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCustom.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp
    llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp
    llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbol.h Sun Feb 15 14:27:53 2015
@@ -53,7 +53,7 @@ public:
   /// call dump() on the underlying RawSymbol, which allows us to discover
   /// unknown properties, but individual implementations of PDBSymbol may
   /// override the behavior to only dump known fields.
-  virtual void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const = 0;
+  virtual void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const = 0;
   void defaultDump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const;
 
   PDB_SymType getSymTag() const;

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Annotation)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAddressOffset)
   FORWARD_SYMBOL_METHOD(getAddressSection)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Block)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAddressOffset)
   FORWARD_SYMBOL_METHOD(getAddressSection)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Compiland)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(isEditAndContinueEnabled)
   FORWARD_SYMBOL_METHOD(getLexicalParentId)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::CompilandDetails)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   void getFrontEndVersion(VersionInfo &Version) const {
     RawSymbol->getFrontEndVersion(Version);

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::CompilandEnv)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getLexicalParentId)
   FORWARD_SYMBOL_METHOD(getName)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h Sun Feb 15 14:27:53 2015
@@ -28,7 +28,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Custom)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   void getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes);
   FORWARD_SYMBOL_METHOD(getSymIndexId)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolData.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolData.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolData.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolData.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Data)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAccess)
   FORWARD_SYMBOL_METHOD(getAddressOffset)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolExe.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolExe.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolExe.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolExe.h Sun Feb 15 14:27:53 2015
@@ -25,7 +25,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Exe)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAge)
   FORWARD_SYMBOL_METHOD(getGuid)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h Sun Feb 15 14:27:53 2015
@@ -22,7 +22,7 @@ public:
   PDBSymbolFunc(const IPDBSession &PDBSession,
                 std::unique_ptr<IPDBRawSymbol> FuncSymbol);
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   std::unique_ptr<PDBSymbolTypeFunctionSig> getSignature() const;
 

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FuncDebugEnd)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAddressOffset)
   FORWARD_SYMBOL_METHOD(getAddressSection)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FuncDebugStart)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAddressOffset)
   FORWARD_SYMBOL_METHOD(getAddressSection)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Label)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAddressOffset)
   FORWARD_SYMBOL_METHOD(getAddressSection)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::PublicSymbol)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAddressOffset)
   FORWARD_SYMBOL_METHOD(getAddressSection)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h Sun Feb 15 14:27:53 2015
@@ -25,7 +25,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Thunk)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAccess)
   FORWARD_SYMBOL_METHOD(getAddressOffset)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::ArrayType)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getArrayIndexTypeId)
   FORWARD_SYMBOL_METHOD(isConstType)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::BaseClass)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getAccess)
   FORWARD_SYMBOL_METHOD(getClassParentId)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::BuiltinType)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getBuiltinType)
   FORWARD_SYMBOL_METHOD(isConstType)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::CustomType)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getOemId)
   FORWARD_SYMBOL_METHOD(getOemSymbolId)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Dimension)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getLowerBoundId)
   FORWARD_SYMBOL_METHOD(getUpperBoundId)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Enum)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getBuiltinType)
   FORWARD_SYMBOL_METHOD(getClassParentId)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Friend)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getClassParentId)
   FORWARD_SYMBOL_METHOD(getName)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FunctionArg)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getClassParentId)
   FORWARD_SYMBOL_METHOD(getLexicalParentId)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h Sun Feb 15 14:27:53 2015
@@ -28,7 +28,7 @@ public:
   std::unique_ptr<IPDBEnumSymbols> getArguments() const;
   std::unique_ptr<PDBSymbol> getClassParent() const;
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
   void dumpArgList(raw_ostream &OS) const;
 
   FORWARD_SYMBOL_METHOD(getCallingConvention)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::ManagedType)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getName)
   FORWARD_SYMBOL_METHOD(getSymIndexId)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::PointerType)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(isConstType)
   FORWARD_SYMBOL_METHOD(getLength)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Typedef)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getBuiltinType)
   FORWARD_SYMBOL_METHOD(getClassParentId)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::UDT)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getClassParentId)
   FORWARD_SYMBOL_METHOD(hasConstructor)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::VTable)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getClassParentId)
   FORWARD_SYMBOL_METHOD(isConstType)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::VTableShape)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(isConstType)
   FORWARD_SYMBOL_METHOD(getCount)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h Sun Feb 15 14:27:53 2015
@@ -21,7 +21,7 @@ public:
   PDBSymbolUnknown(const IPDBSession &PDBSession,
                    std::unique_ptr<IPDBRawSymbol> UnknownSymbol);
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   static bool classof(const PDBSymbol *S) {
     return (S->getSymTag() == PDB_SymType::None ||

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h Sun Feb 15 14:27:53 2015
@@ -24,7 +24,7 @@ public:
 
   DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::UsingNamespace)
 
-  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+  void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level, PDB_DumpFlags Flags) const override;
 
   FORWARD_SYMBOL_METHOD(getLexicalParentId)
   FORWARD_SYMBOL_METHOD(getName)

Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBTypes.h Sun Feb 15 14:27:53 2015
@@ -75,6 +75,44 @@ enum class PDB_DumpLevel {
   Detailed,
 };
 
+enum PDB_DumpFlags {
+  PDB_DF_None = 0x0,
+  PDB_DF_Functions = 0x1,  // Dump functions
+  PDB_DF_Data = 0x2,       // Dump variables and constants
+  PDB_DF_Labels = 0x4,     // Dump labels
+  PDB_DF_PublicSyms = 0x8, // Dump public symbols
+  PDB_DF_Classes = 0x10,   // Dump class types
+  PDB_DF_Enums = 0x20,     // Dump enums
+  PDB_DF_Funcsigs = 0x40,  // Dump function signatures
+  PDB_DF_VTables = 0x80,   // Dump virtual function tables
+  PDB_DF_Thunks = 0x100,   // Dump thunks
+  PDB_DF_ObjFiles = 0x200, // Dump object files (compilands)
+  PDB_DF_Typedefs = 0x400, // Dump typedefs
+  PDB_DF_Children = 0x800, // Dump children of the current symbol
+  PDB_DF_Hidden = 0x1000,  // Dump everything.  This is not simply a bitwise
+                           // or of the previous flags.  It will find symbols
+                           // that would otherwise be missed, but can lead to
+                           // much slower dumps for large input files.
+  PDB_DF_All = 0x7FF
+};
+inline PDB_DumpFlags operator|(PDB_DumpFlags LHS, PDB_DumpFlags RHS) {
+  return static_cast<PDB_DumpFlags>((int)LHS | (int)RHS);
+}
+
+inline PDB_DumpFlags operator&(PDB_DumpFlags LHS, PDB_DumpFlags RHS) {
+  return static_cast<PDB_DumpFlags>((int)LHS & (int)RHS);
+}
+
+inline PDB_DumpFlags operator~(PDB_DumpFlags LHS) {
+  return static_cast<PDB_DumpFlags>(~(int)LHS);
+}
+inline PDB_DumpFlags &operator|=(PDB_DumpFlags &LHS, PDB_DumpFlags RHS) {
+  return (LHS = (LHS | RHS));
+}
+inline PDB_DumpFlags &operator&=(PDB_DumpFlags &LHS, PDB_DumpFlags RHS) {
+  return (LHS = (LHS & RHS));
+}
+
 /// Defines a 128-bit unique identifier.  This maps to a GUID on Windows, but
 /// is abstracted here for the purposes of non-Windows platforms that don't have
 /// the GUID structure defined.

Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp Sun Feb 15 14:27:53 2015
@@ -352,7 +352,7 @@ DIARawSymbol::findChildren(PDB_SymType T
   enum SymTagEnum EnumVal = static_cast<enum SymTagEnum>(Type);
 
   CComPtr<IDiaEnumSymbols> DiaEnumerator;
-  if (S_OK != Symbol->findChildren(EnumVal, nullptr, nsNone, &DiaEnumerator))
+  if (S_OK != Symbol->findChildrenEx(EnumVal, nullptr, nsNone, &DiaEnumerator))
     return nullptr;
 
   return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
@@ -370,7 +370,7 @@ DIARawSymbol::findChildren(PDB_SymType T
 
   CComPtr<IDiaEnumSymbols> DiaEnumerator;
   if (S_OK !=
-      Symbol->findChildren(EnumVal, Name16Str, CompareFlags, &DiaEnumerator))
+      Symbol->findChildrenEx(EnumVal, Name16Str, CompareFlags, &DiaEnumerator))
     return nullptr;
 
   return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolAnnotation::PDBSymbolAnnotation
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolAnnotation::dump(raw_ostream &OS, int Indent,
-                               PDB_DumpLevel Level) const {}
+                               PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolBlock.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolBlock.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolBlock.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolBlock::PDBSymbolBlock(const IPD
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolBlock::dump(raw_ostream &OS, int Indent,
-                          PDB_DumpLevel Level) const {}
+                          PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp Sun Feb 15 14:27:53 2015
@@ -28,75 +28,43 @@ PDBSymbolCompiland::PDBSymbolCompiland(c
                                        std::unique_ptr<IPDBRawSymbol> Symbol)
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
+#define SKIP_SYMBOL_IF_FLAG_UNSET(Tag, Flag) \
+  case PDB_SymType::Tag: \
+    if ((Flags & Flag) == 0) \
+      continue;   \
+    break;
+
 void PDBSymbolCompiland::dump(raw_ostream &OS, int Indent,
-                              PDB_DumpLevel Level) const {
+                              PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   if (Level == PDB_DumpLevel::Detailed) {
     std::string FullName = getName();
-    StringRef Name = llvm::sys::path::filename(StringRef(FullName.c_str()));
-
-    OS.indent(Indent);
-    OS << "Compiland: " << Name << "\n";
-
-    std::string Source = getSourceFileName();
-    std::string Library = getLibraryName();
-    if (!Source.empty())
-      OS << stream_indent(Indent + 2) << "Source: " << this->getSourceFileName()
-         << "\n";
-    if (!Library.empty())
-      OS << stream_indent(Indent + 2) << "Library: " << this->getLibraryName()
-         << "\n";
-
-    TagStats Stats;
-    auto ChildrenEnum = getChildStats(Stats);
-    OS << stream_indent(Indent + 2) << "Children: " << Stats << "\n";
-    if (Level >= PDB_DumpLevel::Detailed) {
-      while (auto Child = ChildrenEnum->getNext()) {
-        if (llvm::isa<PDBSymbolCompilandDetails>(*Child))
-          continue;
-        if (llvm::isa<PDBSymbolCompilandEnv>(*Child))
-          continue;
-        PDB_DumpLevel ChildLevel = (Level == PDB_DumpLevel::Detailed)
-                                       ? PDB_DumpLevel::Normal
-                                       : PDB_DumpLevel::Compact;
-        Child->dump(OS, Indent + 4, ChildLevel);
-        OS << "\n";
+    OS << stream_indent(Indent) << FullName;
+    if (Flags & PDB_DF_Children) {
+      if (Level >= PDB_DumpLevel::Detailed) {
+        auto ChildrenEnum = findAllChildren();
+        while (auto Child = ChildrenEnum->getNext()) {
+          switch (Child->getSymTag()) {
+            SKIP_SYMBOL_IF_FLAG_UNSET(Function, PDB_DF_Functions)
+            SKIP_SYMBOL_IF_FLAG_UNSET(Data, PDB_DF_Data)
+            SKIP_SYMBOL_IF_FLAG_UNSET(Label, PDB_DF_Labels)
+            SKIP_SYMBOL_IF_FLAG_UNSET(PublicSymbol, PDB_DF_PublicSyms)
+            SKIP_SYMBOL_IF_FLAG_UNSET(UDT, PDB_DF_Classes)
+            SKIP_SYMBOL_IF_FLAG_UNSET(Enum, PDB_DF_Enums)
+            SKIP_SYMBOL_IF_FLAG_UNSET(FunctionSig, PDB_DF_Funcsigs)
+            SKIP_SYMBOL_IF_FLAG_UNSET(VTable, PDB_DF_VTables)
+            SKIP_SYMBOL_IF_FLAG_UNSET(Thunk, PDB_DF_Thunks)
+            SKIP_SYMBOL_IF_FLAG_UNSET(Compiland, PDB_DF_ObjFiles)
+            default:
+              continue;
+          }
+          PDB_DumpLevel ChildLevel = (Level == PDB_DumpLevel::Detailed)
+                                         ? PDB_DumpLevel::Normal
+                                         : PDB_DumpLevel::Compact;
+          OS << "\n";
+          Child->dump(OS, Indent + 2, ChildLevel, PDB_DF_Children);
+        }
       }
     }
-
-    auto DetailsEnum(findAllChildren<PDBSymbolCompilandDetails>());
-    if (auto CD = DetailsEnum->getNext()) {
-      VersionInfo FE;
-      VersionInfo BE;
-      CD->getFrontEndVersion(FE);
-      CD->getBackEndVersion(BE);
-      OS << stream_indent(Indent + 2) << "Compiler: " << CD->getCompilerName()
-         << "\n";
-      OS << stream_indent(Indent + 2) << "Version: " << FE << ", " << BE
-         << "\n";
-
-      OS << stream_indent(Indent + 2) << "Lang: " << CD->getLanguage() << "\n";
-      OS << stream_indent(Indent + 2) << "Attributes: ";
-      if (CD->hasDebugInfo())
-        OS << "DebugInfo ";
-      if (CD->isDataAligned())
-        OS << "DataAligned ";
-      if (CD->isLTCG())
-        OS << "LTCG ";
-      if (CD->hasSecurityChecks())
-        OS << "SecurityChecks ";
-      if (CD->isHotpatchable())
-        OS << "HotPatchable";
-
-      auto Files(Session.getSourceFilesForCompiland(*this));
-      OS << "\n";
-      OS << stream_indent(Indent + 2) << Files->getChildCount()
-         << " source files";
-    }
-    uint32_t Count = DetailsEnum->getChildCount();
-    if (Count > 1) {
-      OS << "\n";
-      OS << stream_indent(Indent + 2) << "(" << Count - 1 << " more omitted)";
-    }
   } else {
     std::string FullName = getName();
     OS << stream_indent(Indent) << "Compiland: " << FullName;

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolCompilandDetails::PDBSymbolComp
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolCompilandDetails::dump(raw_ostream &OS, int Indent,
-                                     PDB_DumpLevel Level) const {}
+                                     PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp Sun Feb 15 14:27:53 2015
@@ -26,4 +26,4 @@ std::string PDBSymbolCompilandEnv::getVa
 }
 
 void PDBSymbolCompilandEnv::dump(raw_ostream &OS, int Indent,
-                                 PDB_DumpLevel Level) const {}
+                                 PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCustom.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCustom.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCustom.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolCustom.cpp Sun Feb 15 14:27:53 2015
@@ -25,4 +25,4 @@ void PDBSymbolCustom::getDataBytes(llvm:
 }
 
 void PDBSymbolCustom::dump(raw_ostream &OS, int Indent,
-                           PDB_DumpLevel Level) const {}
\ No newline at end of file
+                           PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}
\ No newline at end of file

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolData.cpp Sun Feb 15 14:27:53 2015
@@ -24,58 +24,56 @@ PDBSymbolData::PDBSymbolData(const IPDBS
     : PDBSymbol(PDBSession, std::move(DataSymbol)) {}
 
 void PDBSymbolData::dump(raw_ostream &OS, int Indent,
-                         PDB_DumpLevel Level) const {
+                         PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   PDB_LocType Loc = getLocationType();
   PDB_DataKind Kind = getDataKind();
-  if (Level >= PDB_DumpLevel::Normal) {
-    switch (Loc) {
-    case PDB_LocType::Static: {
-      uint32_t RVA = getRelativeVirtualAddress();
-      OS << Kind << " data[";
-      if (RVA != 0)
-        OS << format_hex(RVA, 10);
-      else
-        OS << "???";
-      break;
-    }
-    case PDB_LocType::TLS:
-      OS << "threadlocal " << Kind << " data[";
-      OS << getAddressSection() << ":" << format_hex(getAddressOffset(), 10);
-      break;
-    case PDB_LocType::RegRel:
-      OS << "regrel " << Kind << " data[";
-      OS << getRegisterId() << " + " << getOffset();
-      break;
-    case PDB_LocType::ThisRel: {
-      uint32_t Offset = getOffset();
-      OS << Kind << " data[this + " << format_hex(Offset, 4);
-      break;
-    }
-    case PDB_LocType::Enregistered:
-      OS << "register " << Kind << " data[" << getRegisterId();
-      break;
-    case PDB_LocType::BitField: {
-      OS << "bitfield data[this + ";
-      uint32_t Offset = getOffset();
-      uint32_t BitPos = getBitPosition();
-      uint32_t Length = getLength();
-      OS << format_hex(Offset, 4) << ":" << BitPos << "," << Length;
-      break;
-    }
-    case PDB_LocType::Slot:
-      OS << getSlot();
-      break;
-    case PDB_LocType::Constant: {
-      OS << "constant data[";
-      OS << getValue();
-      break;
-    }
-    case PDB_LocType::IlRel:
-    case PDB_LocType::MetaData:
-    default:
+  switch (Loc) {
+  case PDB_LocType::Static: {
+    uint32_t RVA = getRelativeVirtualAddress();
+    OS << Kind << " data[";
+    if (RVA != 0)
+      OS << format_hex(RVA, 10);
+    else
       OS << "???";
-    }
+    break;
+  }
+  case PDB_LocType::TLS:
+    OS << "threadlocal " << Kind << " data[";
+    OS << getAddressSection() << ":" << format_hex(getAddressOffset(), 10);
+    break;
+  case PDB_LocType::RegRel:
+    OS << "regrel " << Kind << " data[";
+    OS << getRegisterId() << " + " << getOffset();
+    break;
+  case PDB_LocType::ThisRel: {
+    uint32_t Offset = getOffset();
+    OS << Kind << " data[this + " << format_hex(Offset, 4);
+    break;
+  }
+  case PDB_LocType::Enregistered:
+    OS << "register " << Kind << " data[" << getRegisterId();
+    break;
+  case PDB_LocType::BitField: {
+    OS << "bitfield data[this + ";
+    uint32_t Offset = getOffset();
+    uint32_t BitPos = getBitPosition();
+    uint32_t Length = getLength();
+    OS << format_hex(Offset, 4) << ":" << BitPos << "," << Length;
+    break;
+  }
+  case PDB_LocType::Slot:
+    OS << getSlot();
+    break;
+  case PDB_LocType::Constant: {
+    OS << "constant data[";
+    OS << getValue();
+    break;
+  }
+  case PDB_LocType::IlRel:
+  case PDB_LocType::MetaData:
+  default:
+    OS << "???";
   }
 
   OS << "] ";

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolExe.cpp Sun Feb 15 14:27:53 2015
@@ -21,12 +21,18 @@
 
 using namespace llvm;
 
+#define SKIP_SYMBOL_IF_FLAG_UNSET(Tag, Flag)                                   \
+  case PDB_SymType::Tag:                                                       \
+    if ((Flags & Flag) == 0)                                                   \
+      continue;                                                                \
+    break;
+
 PDBSymbolExe::PDBSymbolExe(const IPDBSession &PDBSession,
                            std::unique_ptr<IPDBRawSymbol> Symbol)
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolExe::dump(raw_ostream &OS, int Indent,
-                        PDB_DumpLevel Level) const {
+                        PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   std::string FileName(getSymbolsFileName());
 
   OS << stream_indent(Indent) << "Summary for " << FileName << "\n";
@@ -46,25 +52,76 @@ void PDBSymbolExe::dump(raw_ostream &OS,
     OS << "HasPrivateSymbols ";
   OS << "\n";
 
-  auto ChildrenEnum = findAllChildren();
-  OS << stream_indent(Indent + 2) << ChildrenEnum->getChildCount()
-     << " children\n";
-#if 0
-  dumpChildren(OS, PDB_SymType::None, Indent+4);
-#else
-  dumpChildren(OS, "Compilands", PDB_SymType::Compiland, Indent + 4);
-  dumpChildren(OS, "Functions", PDB_SymType::Function, Indent + 4);
-  dumpChildren(OS, "Blocks", PDB_SymType::Block, Indent + 4);
-  dumpChildren(OS, "Data", PDB_SymType::Data, Indent + 4);
-  dumpChildren(OS, "Labels", PDB_SymType::Label, Indent + 4);
-  dumpChildren(OS, "Public Symbols", PDB_SymType::PublicSymbol, Indent + 4);
-  dumpChildren(OS, "UDTs", PDB_SymType::UDT, Indent + 4);
-  dumpChildren(OS, "Enums", PDB_SymType::Enum, Indent + 4);
-  dumpChildren(OS, "Function Signatures", PDB_SymType::FunctionSig, Indent + 4);
-  dumpChildren(OS, "Typedefs", PDB_SymType::Typedef, Indent + 4);
-  dumpChildren(OS, "VTables", PDB_SymType::VTable, Indent + 4);
-  dumpChildren(OS, "Thunks", PDB_SymType::Thunk, Indent + 4);
-#endif
+  if (Flags & PDB_DF_Children) {
+    if (Flags & PDB_DF_Hidden) {
+      // For some reason, for each SymTag T, this dumps more items of type T
+      // than are dumped by calling dumpChildren(T).  In other words, there are
+      // "hidden" symbols.  For example, it causes functions to be dumped which
+      // have no address information, whereas specifically dumping only
+      // functions will not find those symbols.
+      //
+      // My suspicion is that in the underlying DIA call, when you call
+      // findChildren, passing a value of SymTagNone means all children
+      // recursively, whereas passing a concrete tag value means only immediate
+      // children of the global scope.  So perhaps we need to find these
+      // mysterious missing values by recursing through the hierarchy.
+      //
+      // On the other hand, there may just be some symbols that DIA tries to
+      // hide from you because it thinks you don't care about them.  However
+      // experimentation shows that even vtables, for example, can't be found
+      // without an exhaustive search.
+      auto ChildrenEnum = findAllChildren();
+      OS << stream_indent(Indent + 2) << ChildrenEnum->getChildCount()
+         << " symbols";
+
+      while (auto Child = ChildrenEnum->getNext()) {
+        switch (Child->getSymTag()) {
+          SKIP_SYMBOL_IF_FLAG_UNSET(Function, PDB_DF_Functions)
+          SKIP_SYMBOL_IF_FLAG_UNSET(Data, PDB_DF_Data)
+          SKIP_SYMBOL_IF_FLAG_UNSET(Label, PDB_DF_Labels)
+          SKIP_SYMBOL_IF_FLAG_UNSET(PublicSymbol, PDB_DF_PublicSyms)
+          SKIP_SYMBOL_IF_FLAG_UNSET(UDT, PDB_DF_Classes)
+          SKIP_SYMBOL_IF_FLAG_UNSET(Enum, PDB_DF_Enums)
+          SKIP_SYMBOL_IF_FLAG_UNSET(FunctionSig, PDB_DF_Funcsigs)
+          SKIP_SYMBOL_IF_FLAG_UNSET(VTable, PDB_DF_VTables)
+          SKIP_SYMBOL_IF_FLAG_UNSET(Thunk, PDB_DF_Thunks)
+          SKIP_SYMBOL_IF_FLAG_UNSET(Compiland, PDB_DF_ObjFiles)
+        default:
+          continue;
+        }
+        PDB_DumpLevel ChildLevel = (Level == PDB_DumpLevel::Detailed)
+                                       ? PDB_DumpLevel::Normal
+                                       : PDB_DumpLevel::Compact;
+        OS << "\n";
+        Child->dump(OS, Indent + 4, ChildLevel, PDB_DF_Children);
+      }
+    } else {
+      if (Flags & PDB_DF_ObjFiles)
+        dumpChildren(OS, "Compilands", PDB_SymType::Compiland, Indent + 4);
+      if (Flags & PDB_DF_Functions)
+        dumpChildren(OS, "Functions", PDB_SymType::Function, Indent + 4);
+      if (Flags & PDB_DF_Data)
+        dumpChildren(OS, "Data", PDB_SymType::Data, Indent + 4);
+      if (Flags & PDB_DF_Labels)
+        dumpChildren(OS, "Labels", PDB_SymType::Label, Indent + 4);
+      if (Flags & PDB_DF_PublicSyms)
+        dumpChildren(OS, "Public Symbols", PDB_SymType::PublicSymbol,
+                     Indent + 4);
+      if (Flags & PDB_DF_Classes)
+        dumpChildren(OS, "UDTs", PDB_SymType::UDT, Indent + 4);
+      if (Flags & PDB_DF_Enums)
+        dumpChildren(OS, "Enums", PDB_SymType::Enum, Indent + 4);
+      if (Flags & PDB_DF_Funcsigs)
+        dumpChildren(OS, "Function Signatures", PDB_SymType::FunctionSig,
+                     Indent + 4);
+      if (Flags & PDB_DF_Typedefs)
+        dumpChildren(OS, "Typedefs", PDB_SymType::Typedef, Indent + 4);
+      if (Flags & PDB_DF_VTables)
+        dumpChildren(OS, "VTables", PDB_SymType::VTable, Indent + 4);
+      if (Flags & PDB_DF_Thunks)
+        dumpChildren(OS, "Thunks", PDB_SymType::Thunk, Indent + 4);
+    }
+  }
 }
 
 void PDBSymbolExe::dumpChildren(raw_ostream &OS, StringRef Label,
@@ -73,7 +130,7 @@ void PDBSymbolExe::dumpChildren(raw_ostr
   OS << stream_indent(Indent) << Label << ": (" << ChildrenEnum->getChildCount()
      << " items)\n";
   while (auto Child = ChildrenEnum->getNext()) {
-    Child->dump(OS, Indent + 2, PDB_DumpLevel::Normal);
+    Child->dump(OS, Indent + 2, PDB_DumpLevel::Normal, PDB_DF_None);
     OS << "\n";
   }
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFunc.cpp Sun Feb 15 14:27:53 2015
@@ -29,66 +29,58 @@ std::unique_ptr<PDBSymbolTypeFunctionSig
 }
 
 void PDBSymbolFunc::dump(raw_ostream &OS, int Indent,
-                         PDB_DumpLevel Level) const {
+                         PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
+  uint32_t FuncStart = getRelativeVirtualAddress();
+  uint32_t FuncEnd = FuncStart + getLength();
   OS << stream_indent(Indent);
-  // if (getName() == "__crtCreateThreadpoolWait") {
-  //  RawSymbol->dump(OS, Indent+2, Level);
-  //  OS.flush();
-  //}
-  if (Level >= PDB_DumpLevel::Normal) {
-    uint32_t FuncStart = getRelativeVirtualAddress();
-    uint32_t FuncEnd = FuncStart + getLength();
-    if (FuncStart == 0 && FuncEnd == 0) {
-      OS << "func [???] ";
-    } else {
-      OS << "func ";
-      OS << "[" << format_hex(FuncStart, 8);
-      if (auto DebugStart = findOneChild<PDBSymbolFuncDebugStart>())
-        OS << "+" << DebugStart->getRelativeVirtualAddress() - FuncStart;
-      OS << " - " << format_hex(FuncEnd, 8);
-      if (auto DebugEnd = findOneChild<PDBSymbolFuncDebugEnd>())
-        OS << "-" << FuncEnd - DebugEnd->getRelativeVirtualAddress();
-      OS << "] ";
-    }
-
-    PDB_RegisterId Reg = getLocalBasePointerRegisterId();
-    if (Reg == PDB_RegisterId::VFrame)
-      OS << "(VFrame)";
-    else if (hasFramePointer())
-      OS << "(" << Reg << ")";
-    else
-      OS << "(FPO)";
-
-    OS << " ";
-    if (auto FuncSig = getSignature()) {
-      // If we have a signature, dump the name with the signature.
-      if (auto ReturnType = FuncSig->getReturnType()) {
-        ReturnType->dump(OS, 0, PDB_DumpLevel::Compact);
-        OS << " ";
-      }
+  if (FuncStart == 0 && FuncEnd == 0) {
+    OS << "func [???] ";
+  } else {
+    OS << "func ";
+    OS << "[" << format_hex(FuncStart, 8);
+    if (auto DebugStart = findOneChild<PDBSymbolFuncDebugStart>())
+      OS << "+" << DebugStart->getRelativeVirtualAddress() - FuncStart;
+    OS << " - " << format_hex(FuncEnd, 8);
+    if (auto DebugEnd = findOneChild<PDBSymbolFuncDebugEnd>())
+      OS << "-" << FuncEnd - DebugEnd->getRelativeVirtualAddress();
+    OS << "] ";
+  }
 
-      OS << FuncSig->getCallingConvention() << " ";
+  PDB_RegisterId Reg = getLocalBasePointerRegisterId();
+  if (Reg == PDB_RegisterId::VFrame)
+    OS << "(VFrame)";
+  else if (hasFramePointer())
+    OS << "(" << Reg << ")";
+  else
+    OS << "(FPO)";
+
+  OS << " ";
+  if (isVirtual() || isPureVirtual())
+    OS << "virtual ";
+
+  if (auto FuncSig = getSignature()) {
+    // If we have a signature, dump the name with the signature.
+    if (auto ReturnType = FuncSig->getReturnType()) {
+      ReturnType->dump(OS, 0, PDB_DumpLevel::Compact, PDB_DF_Children);
+      OS << " ";
+    }
 
-      if (auto ClassParent = FuncSig->getClassParent()) {
-        ClassParent->dump(OS, 0, PDB_DumpLevel::Compact);
-        OS << "::";
-      }
+    OS << FuncSig->getCallingConvention() << " ";
 
-      OS << getName();
-      FuncSig->dumpArgList(OS);
-    } else {
-      uint32_t ClassId = getClassParentId();
-      if (ClassId != 0) {
-        if (auto Class = Session.getSymbolById(ClassId)) {
-          if (auto UDT = dyn_cast<PDBSymbolTypeUDT>(Class.get()))
-            OS << UDT->getName() << "::";
-          else
-            OS << "{class " << Class->getSymTag() << "}::";
-        }
+    OS << getName();
+    FuncSig->dumpArgList(OS);
+    if (isPureVirtual())
+      OS << " = 0";
+  } else {
+    uint32_t ClassId = getClassParentId();
+    if (ClassId != 0) {
+      if (auto Class = Session.getSymbolById(ClassId)) {
+        if (auto UDT = dyn_cast<PDBSymbolTypeUDT>(Class.get()))
+          OS << UDT->getName() << "::";
+        else
+          OS << "{class " << Class->getSymTag() << "}::";
       }
-      OS << getName();
     }
-  } else {
     OS << getName();
   }
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolFuncDebugEnd::PDBSymbolFuncDebu
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolFuncDebugEnd::dump(raw_ostream &OS, int Indent,
-                                 PDB_DumpLevel Level) const {}
+                                 PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolFuncDebugStart::PDBSymbolFuncDe
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolFuncDebugStart::dump(raw_ostream &OS, int Indent,
-                                   PDB_DumpLevel Level) const {}
+                                   PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolLabel.cpp Sun Feb 15 14:27:53 2015
@@ -21,7 +21,7 @@ PDBSymbolLabel::PDBSymbolLabel(const IPD
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolLabel::dump(raw_ostream &OS, int Indent,
-                          PDB_DumpLevel Level) const {
+                          PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   OS << "label [" << format_hex(getRelativeVirtualAddress(), 10) << "] "
      << getName();

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp Sun Feb 15 14:27:53 2015
@@ -20,7 +20,7 @@ PDBSymbolPublicSymbol::PDBSymbolPublicSy
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolPublicSymbol::dump(raw_ostream &OS, int Indent,
-                                 PDB_DumpLevel Level) const {
+                                 PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   OS << "public symbol: " << getName();
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolThunk.cpp Sun Feb 15 14:27:53 2015
@@ -21,7 +21,7 @@ PDBSymbolThunk::PDBSymbolThunk(const IPD
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolThunk::dump(raw_ostream &OS, int Indent,
-                          PDB_DumpLevel Level) const {
+                          PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS.indent(Indent);
   OS << "thunk ";
   PDB_ThunkOrdinal Ordinal = getThunkOrdinal();

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp Sun Feb 15 14:27:53 2015
@@ -21,10 +21,10 @@ PDBSymbolTypeArray::PDBSymbolTypeArray(c
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeArray::dump(raw_ostream &OS, int Indent,
-                              PDB_DumpLevel Level) const {
+                              PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   if (auto ElementType = Session.getSymbolById(getTypeId()))
-    ElementType->dump(OS, 0, PDB_DumpLevel::Compact);
+    ElementType->dump(OS, 0, PDB_DumpLevel::Compact, PDB_DF_Children);
   else
     OS << "<unknown-element-type>";
   OS << "[" << getLength() << "]";

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp Sun Feb 15 14:27:53 2015
@@ -20,7 +20,7 @@ PDBSymbolTypeBaseClass::PDBSymbolTypeBas
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeBaseClass::dump(raw_ostream &OS, int Indent,
-                                  PDB_DumpLevel Level) const {
+                                  PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   OS << "<base class> " << getName();
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp Sun Feb 15 14:27:53 2015
@@ -20,7 +20,7 @@ PDBSymbolTypeBuiltin::PDBSymbolTypeBuilt
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeBuiltin::dump(raw_ostream &OS, int Indent,
-                                PDB_DumpLevel Level) const {
+                                PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   PDB_BuiltinType Type = getBuiltinType();
   OS << Type;

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolTypeCustom::PDBSymbolTypeCustom
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeCustom::dump(raw_ostream &OS, int Indent,
-                               PDB_DumpLevel Level) const {}
+                               PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp Sun Feb 15 14:27:53 2015
@@ -21,4 +21,4 @@ PDBSymbolTypeDimension::PDBSymbolTypeDim
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeDimension::dump(raw_ostream &OS, int Indent,
-                                  PDB_DumpLevel Level) const {}
+                                  PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp Sun Feb 15 14:27:53 2015
@@ -21,7 +21,7 @@ PDBSymbolTypeEnum::PDBSymbolTypeEnum(con
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeEnum::dump(raw_ostream &OS, int Indent,
-                             PDB_DumpLevel Level) const {
+                             PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   if (Level >= PDB_DumpLevel::Normal)
     OS << "enum ";
@@ -29,7 +29,7 @@ void PDBSymbolTypeEnum::dump(raw_ostream
   uint32_t ClassId = getClassParentId();
   if (ClassId != 0) {
     if (auto ClassParent = Session.getSymbolById(ClassId)) {
-      ClassParent->dump(OS, 0, Level);
+      ClassParent->dump(OS, 0, Level, PDB_DF_Children);
       OS << "::";
     }
   }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolTypeFriend::PDBSymbolTypeFriend
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeFriend::dump(raw_ostream &OS, int Indent,
-                               PDB_DumpLevel Level) const {}
+                               PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp Sun Feb 15 14:27:53 2015
@@ -21,10 +21,10 @@ PDBSymbolTypeFunctionArg::PDBSymbolTypeF
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeFunctionArg::dump(raw_ostream &OS, int Indent,
-                                    PDB_DumpLevel Level) const {
+                                    PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   uint32_t TypeId = getTypeId();
   if (auto Type = Session.getSymbolById(TypeId)) {
-    Type->dump(OS, 0, Level);
+    Type->dump(OS, 0, Level, PDB_DF_Children);
   }
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp Sun Feb 15 14:27:53 2015
@@ -87,7 +87,7 @@ void PDBSymbolTypeFunctionSig::dumpArgLi
   if (auto ChildEnum = getArguments()) {
     uint32_t Index = 0;
     while (auto Arg = ChildEnum->getNext()) {
-      Arg->dump(OS, 0, PDB_DumpLevel::Compact);
+      Arg->dump(OS, 0, PDB_DumpLevel::Compact, PDB_DF_Children);
       if (++Index < ChildEnum->getChildCount())
         OS << ", ";
     }
@@ -100,18 +100,18 @@ void PDBSymbolTypeFunctionSig::dumpArgLi
 }
 
 void PDBSymbolTypeFunctionSig::dump(raw_ostream &OS, int Indent,
-                                    PDB_DumpLevel Level) const {
+                                    PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
 
   if (auto ReturnType = getReturnType()) {
-    ReturnType->dump(OS, 0, PDB_DumpLevel::Compact);
+    ReturnType->dump(OS, 0, PDB_DumpLevel::Compact, PDB_DF_Children);
     OS << " ";
   }
 
   OS << getCallingConvention() << " ";
   if (auto ClassParent = getClassParent()) {
     OS << "(";
-    ClassParent->dump(OS, 0, PDB_DumpLevel::Compact);
+    ClassParent->dump(OS, 0, PDB_DumpLevel::Compact, PDB_DF_Children);
     OS << "::*)";
   }
 

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolTypeManaged::PDBSymbolTypeManag
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeManaged::dump(raw_ostream &OS, int Indent,
-                                PDB_DumpLevel Level) const {}
+                                PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp Sun Feb 15 14:27:53 2015
@@ -22,7 +22,7 @@ PDBSymbolTypePointer::PDBSymbolTypePoint
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypePointer::dump(raw_ostream &OS, int Indent,
-                                PDB_DumpLevel Level) const {
+                                PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   if (isConstType())
     OS << "const ";
@@ -34,12 +34,12 @@ void PDBSymbolTypePointer::dump(raw_ostr
     // the middle of the signature.
     if (auto FuncSig = dyn_cast<PDBSymbolTypeFunctionSig>(PointeeType.get())) {
       if (auto ReturnType = FuncSig->getReturnType())
-        ReturnType->dump(OS, 0, PDB_DumpLevel::Compact);
+        ReturnType->dump(OS, 0, PDB_DumpLevel::Compact, PDB_DF_Children);
       OS << " (" << FuncSig->getCallingConvention() << " ";
       OS << ((isReference()) ? "&" : "*") << ")";
       FuncSig->dumpArgList(OS);
     } else {
-      PointeeType->dump(OS, 0, PDB_DumpLevel::Compact);
+      PointeeType->dump(OS, 0, PDB_DumpLevel::Compact, PDB_DF_Children);
       OS << ((isReference()) ? "&" : "*");
     }
   }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp Sun Feb 15 14:27:53 2015
@@ -22,7 +22,7 @@ PDBSymbolTypeTypedef::PDBSymbolTypeTyped
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeTypedef::dump(raw_ostream &OS, int Indent,
-                                PDB_DumpLevel Level) const {
+                                PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS.indent(Indent);
   if (Level >= PDB_DumpLevel::Normal) {
     std::string Name = getName();
@@ -30,7 +30,7 @@ void PDBSymbolTypeTypedef::dump(raw_ostr
     std::string TargetTypeName;
     uint32_t TargetId = getTypeId();
     if (auto TypeSymbol = Session.getSymbolById(TargetId)) {
-      TypeSymbol->dump(OS, 0, PDB_DumpLevel::Compact);
+      TypeSymbol->dump(OS, 0, PDB_DumpLevel::Compact, PDB_DF_Children);
     }
     OS << TargetTypeName;
   } else {

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp Sun Feb 15 14:27:53 2015
@@ -21,7 +21,7 @@ PDBSymbolTypeUDT::PDBSymbolTypeUDT(const
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeUDT::dump(raw_ostream &OS, int Indent,
-                            PDB_DumpLevel Level) const {
+                            PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   if (Level >= PDB_DumpLevel::Normal)
     OS << "class ";
@@ -30,7 +30,7 @@ void PDBSymbolTypeUDT::dump(raw_ostream
     uint32_t ClassId = getClassParentId();
     if (ClassId != 0) {
       if (auto ClassParent = Session.getSymbolById(ClassId)) {
-        ClassParent->dump(OS, 0, Level);
+        ClassParent->dump(OS, 0, Level, PDB_DF_Children);
         OS << "::";
       }
     }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp Sun Feb 15 14:27:53 2015
@@ -23,11 +23,11 @@ PDBSymbolTypeVTable::PDBSymbolTypeVTable
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeVTable::dump(raw_ostream &OS, int Indent,
-                               PDB_DumpLevel Level) const {
+                               PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
   OS << stream_indent(Indent);
   uint32_t ClassId = getClassParentId();
   if (auto ClassParent = Session.getSymbolById(ClassId)) {
-    ClassParent->dump(OS, 0, PDB_DumpLevel::Compact);
+    ClassParent->dump(OS, 0, PDB_DumpLevel::Compact, PDB_DF_Children);
     OS << "::";
   }
   OS << "<vtbl> ";
@@ -38,5 +38,4 @@ void PDBSymbolTypeVTable::dump(raw_ostre
                 VtblPointer->getTypeId()))
       OS << "(" << VtblShape->getCount() << " entries)";
   }
-  OS.flush();
 }

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolTypeVTableShape::PDBSymbolTypeV
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolTypeVTableShape::dump(raw_ostream &OS, int Indent,
-                                    PDB_DumpLevel Level) const {}
+                                    PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolUnknown::PDBSymbolUnknown(const
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolUnknown::dump(raw_ostream &OS, int Indent,
-                            PDB_DumpLevel Level) const {}
+                            PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

Modified: llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp?rev=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp Sun Feb 15 14:27:53 2015
@@ -20,4 +20,4 @@ PDBSymbolUsingNamespace::PDBSymbolUsingN
     : PDBSymbol(PDBSession, std::move(Symbol)) {}
 
 void PDBSymbolUsingNamespace::dump(raw_ostream &OS, int Indent,
-                                   PDB_DumpLevel Level) const {}
+                                   PDB_DumpLevel Level, PDB_DumpFlags Flags) const {}

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=229330&r1=229329&r2=229330&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp Sun Feb 15 14:27:53 2015
@@ -38,15 +38,78 @@
 using namespace llvm;
 
 namespace opts {
+
+enum class PDB_DumpType { ByType, ByObjFile, Both };
+
 cl::list<std::string> InputFilenames(cl::Positional,
                                      cl::desc("<input PDB files>"),
                                      cl::OneOrMore);
 
-cl::opt<bool> Compilands("compilands",
-                         cl::desc("Display a list of compilands (e.g. object "
-                                  "files) and symbols for each one."));
-cl::alias CompilandsShort("c", cl::desc("Alias for --compilands"),
-                          cl::aliasopt(Compilands));
+cl::opt<bool> DumpHidden(
+    "hidden",
+    cl::desc("Attempt to find hidden symbols.  This can find additional\n"
+             "symbols that cannot be found otherwise.  For example, vtables\n"
+             "can only be found with an exhaustive search such as this.  Be\n"
+             "warned that the performance can be prohibitive on large PDB "
+             "files."));
+
+cl::opt<bool> DumpAll(
+    "all",
+    cl::desc("Specifies all other options except -hidden and -group-by"));
+cl::opt<bool> DumpObjFiles("compilands", cl::desc("Display object files"));
+cl::opt<bool> DumpFuncs("functions", cl::desc("Display function information"));
+cl::opt<bool> DumpData(
+    "data",
+    cl::desc("Display global, class, and constant variable information."));
+cl::opt<bool> DumpLabels("labels", cl::desc("Display labels"));
+cl::opt<bool> DumpPublic("public", cl::desc("Display public symbols"));
+cl::opt<bool> DumpClasses("classes", cl::desc("Display class type information"));
+cl::opt<bool> DumpEnums("enums", cl::desc("Display enum information"));
+cl::opt<bool> DumpFuncsigs("funcsigs",
+                           cl::desc("Display unique function signatures"));
+cl::opt<bool> DumpTypedefs("typedefs", cl::desc("Display typedefs"));
+cl::opt<bool> DumpThunks("thunks", cl::desc("Display thunks"));
+cl::opt<bool> DumpVtables(
+    "vtables",
+    cl::desc("Display virtual function tables (only with --exhaustive)"));
+
+static cl::opt<PDB_DumpType> DumpMode(
+    "group-by", cl::init(PDB_DumpType::ByType), cl::desc("Dump mode:"),
+    cl::values(
+        clEnumValN(PDB_DumpType::ByType, "type",
+                   "(Default) Display symbols grouped by type"),
+        clEnumValN(PDB_DumpType::ByObjFile, "compiland",
+                   "Display symbols grouped under their containing object "
+                   "file."),
+        clEnumValN(
+            PDB_DumpType::Both, "both",
+            "Display symbols grouped by type, and then by object file.")));
+}
+
+#define SET_DUMP_FLAG_FROM_OPT(Var, Flag, Opt) \
+  if (opts::Opt) \
+    Var |= Flag;
+
+PDB_DumpFlags CalculateDumpFlags() {
+  PDB_DumpFlags Flags = PDB_DF_None;
+
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_Hidden, DumpHidden)
+
+  if (opts::DumpAll)
+    return Flags | PDB_DF_All;
+
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_ObjFiles, DumpObjFiles)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_Functions, DumpFuncs)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_Data, DumpData)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_Labels, DumpLabels)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_PublicSyms, DumpPublic)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_Classes, DumpClasses)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_Enums, DumpEnums)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_Funcsigs, DumpFuncsigs)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_Typedefs, DumpTypedefs)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_Thunks, DumpThunks)
+  SET_DUMP_FLAG_FROM_OPT(Flags, PDB_DF_VTables, DumpVtables)
+  return Flags;
 }
 
 static void dumpInput(StringRef Path) {
@@ -57,15 +120,19 @@ static void dumpInput(StringRef Path) {
     outs() << " is available for your platform.";
     return;
   }
+  PDB_DumpFlags Flags = CalculateDumpFlags();
 
+  if (opts::DumpMode != opts::PDB_DumpType::ByObjFile)
+    Flags |= PDB_DF_Children;
   auto GlobalScope(Session->getGlobalScope());
-  GlobalScope->dump(outs(), 0, PDB_DumpLevel::Normal);
-  outs().flush();
+  GlobalScope->dump(outs(), 0, PDB_DumpLevel::Normal, Flags);
+  outs() << "\n";
 
-  if (opts::Compilands) {
+  if (opts::DumpMode != opts::PDB_DumpType::ByType) {
     auto Compilands = GlobalScope->findAllChildren<PDBSymbolCompiland>();
     while (auto Compiland = Compilands->getNext()) {
-      Compiland->dump(outs(), 0, PDB_DumpLevel::Detailed);
+      Compiland->dump(outs(), 0, PDB_DumpLevel::Detailed,
+                      Flags | PDB_DF_Children);
       outs() << "\n";
     }
   }





More information about the llvm-commits mailing list