PDBSymbolTypeEnum.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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. #include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
  10. #include "llvm/DebugInfo/PDB/IPDBSession.h"
  11. #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
  12. #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
  13. #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
  14. #include <utility>
  15. using namespace llvm;
  16. PDBSymbolTypeEnum::PDBSymbolTypeEnum(const IPDBSession &PDBSession,
  17. std::unique_ptr<IPDBRawSymbol> Symbol)
  18. : PDBSymbol(PDBSession, std::move(Symbol)) {}
  19. std::unique_ptr<PDBSymbolTypeUDT> PDBSymbolTypeEnum::getClassParent() const {
  20. return Session.getConcreteSymbolById<PDBSymbolTypeUDT>(getClassParentId());
  21. }
  22. std::unique_ptr<PDBSymbolTypeBuiltin>
  23. PDBSymbolTypeEnum::getUnderlyingType() const {
  24. return Session.getConcreteSymbolById<PDBSymbolTypeBuiltin>(getTypeId());
  25. }
  26. void PDBSymbolTypeEnum::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }