PDBSymbolExe.cpp 968 B

1234567891011121314151617181920212223242526272829
  1. //===- PDBSymbolExe.cpp - ---------------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
  9. #include "llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h"
  10. #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
  11. #include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
  12. #include "llvm/DebugInfo/PDB/PDBTypes.h"
  13. using namespace llvm;
  14. using namespace llvm::pdb;
  15. void PDBSymbolExe::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }
  16. uint32_t PDBSymbolExe::getPointerByteSize() const {
  17. auto Pointer = findOneChild<PDBSymbolTypePointer>();
  18. if (Pointer)
  19. return Pointer->getLength();
  20. if (getMachineType() == PDB_Machine::x86)
  21. return 4;
  22. return 8;
  23. }