PDBSymbolExe.cpp 890 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/PDBSymDumper.h"
  10. #include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
  11. #include <utility>
  12. using namespace llvm;
  13. using namespace llvm::pdb;
  14. void PDBSymbolExe::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }
  15. uint32_t PDBSymbolExe::getPointerByteSize() const {
  16. auto Pointer = findOneChild<PDBSymbolTypePointer>();
  17. if (Pointer)
  18. return Pointer->getLength();
  19. if (getMachineType() == PDB_Machine::x86)
  20. return 4;
  21. return 8;
  22. }