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