• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- PDBSymbolTypeEnum.cpp - --------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
11 
12 #include "llvm/DebugInfo/PDB/IPDBSession.h"
13 #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
14 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
15 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
16 
17 #include <utility>
18 
19 using namespace llvm;
20 
PDBSymbolTypeEnum(const IPDBSession & PDBSession,std::unique_ptr<IPDBRawSymbol> Symbol)21 PDBSymbolTypeEnum::PDBSymbolTypeEnum(const IPDBSession &PDBSession,
22                                      std::unique_ptr<IPDBRawSymbol> Symbol)
23     : PDBSymbol(PDBSession, std::move(Symbol)) {}
24 
getClassParent() const25 std::unique_ptr<PDBSymbolTypeUDT> PDBSymbolTypeEnum::getClassParent() const {
26   return Session.getConcreteSymbolById<PDBSymbolTypeUDT>(getClassParentId());
27 }
28 
29 std::unique_ptr<PDBSymbolTypeBuiltin>
getUnderlyingType() const30 PDBSymbolTypeEnum::getUnderlyingType() const {
31   return Session.getConcreteSymbolById<PDBSymbolTypeBuiltin>(getTypeId());
32 }
33 
dump(PDBSymDumper & Dumper) const34 void PDBSymbolTypeEnum::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }
35