diff options
Diffstat (limited to 'lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp')
-rw-r--r-- | lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp b/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp index 7132a99a9f16..efa70b0e7bd8 100644 --- a/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp +++ b/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h" +#include "llvm/DebugInfo/PDB/Native/NativeSession.h" #include "llvm/ADT/STLExtras.h" @@ -17,21 +18,31 @@ namespace pdb { NativeCompilandSymbol::NativeCompilandSymbol(NativeSession &Session, SymIndexId SymbolId, DbiModuleDescriptor MI) - : NativeRawSymbol(Session, SymbolId), Module(MI) {} + : NativeRawSymbol(Session, PDB_SymType::Compiland, SymbolId), Module(MI) {} PDB_SymType NativeCompilandSymbol::getSymTag() const { return PDB_SymType::Compiland; } -std::unique_ptr<NativeRawSymbol> NativeCompilandSymbol::clone() const { - return llvm::make_unique<NativeCompilandSymbol>(Session, SymbolId, Module); +void NativeCompilandSymbol::dump(raw_ostream &OS, int Indent, + PdbSymbolIdField ShowIdFields, + PdbSymbolIdField RecurseIdFields) const { + NativeRawSymbol::dump(OS, Indent, ShowIdFields, RecurseIdFields); + + dumpSymbolIdField(OS, "lexicalParentId", 0, Indent, Session, + PdbSymbolIdField::LexicalParent, ShowIdFields, + RecurseIdFields); + dumpSymbolField(OS, "libraryName", getLibraryName(), Indent); + dumpSymbolField(OS, "name", getName(), Indent); + dumpSymbolField(OS, "editAndContinueEnabled", isEditAndContinueEnabled(), + Indent); } bool NativeCompilandSymbol::isEditAndContinueEnabled() const { return Module.hasECInfo(); } -uint32_t NativeCompilandSymbol::getLexicalParentId() const { return 0; } +SymIndexId NativeCompilandSymbol::getLexicalParentId() const { return 0; } // The usage of getObjFileName for getLibraryName and getModuleName for getName // may seem backwards, but it is consistent with DIA, which is what this API |