1 //===- PDBSymbolTypeUDT.cpp - --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/DebugInfo/PDB/IPDBSession.h"
11 #include "llvm/DebugInfo/PDB/PDBSymbol.h"
12 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
17 PDBSymbolTypeUDT::PDBSymbolTypeUDT(const IPDBSession &PDBSession,
18 std::unique_ptr<IPDBRawSymbol> Symbol)
19 : PDBSymbol(PDBSession, std::move(Symbol)) {}
21 void PDBSymbolTypeUDT::dump(raw_ostream &OS, int Indent,
22 PDB_DumpLevel Level) const {
23 OS << stream_indent(Indent);
24 if (Level >= PDB_DumpLevel::Normal)
28 uint32_t ClassId = getClassParentId();
30 if (auto ClassParent = Session.getSymbolById(ClassId)) {
31 ClassParent->dump(OS, 0, Level);
38 if (Level >= PDB_DumpLevel::Normal)
39 OS << " (" << getLength() << " bytes)";