#include "llvm/DebugInfo/PDB/UDTLayout.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
#include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
#include "llvm/DebugInfo/PDB/IPDBSession.h"
#include "llvm/DebugInfo/PDB/PDBSymbol.h"
#include "llvm/DebugInfo/PDB/PDBSymbolData.h"
#include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
#include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h"
#include "llvm/DebugInfo/PDB/PDBTypes.h"
#include "llvm/Support/Casting.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <memory>
usingnamespacellvm;
usingnamespacellvm::pdb;
static std::unique_ptr<PDBSymbol> getSymbolType(const PDBSymbol &Symbol) { … }
static uint32_t getTypeLength(const PDBSymbol &Symbol) { … }
LayoutItemBase::LayoutItemBase(const UDTLayoutBase *Parent,
const PDBSymbol *Symbol, const std::string &Name,
uint32_t OffsetInParent, uint32_t Size,
bool IsElided)
: … { … }
uint32_t LayoutItemBase::deepPaddingSize() const { … }
uint32_t LayoutItemBase::tailPadding() const { … }
DataMemberLayoutItem::DataMemberLayoutItem(
const UDTLayoutBase &Parent, std::unique_ptr<PDBSymbolData> Member)
: … { … }
VBPtrLayoutItem::VBPtrLayoutItem(const UDTLayoutBase &Parent,
std::unique_ptr<PDBSymbolTypeBuiltin> Sym,
uint32_t Offset, uint32_t Size)
: … { … }
const PDBSymbolData &DataMemberLayoutItem::getDataMember() { … }
bool DataMemberLayoutItem::hasUDTLayout() const { … }
const ClassLayout &DataMemberLayoutItem::getUDTLayout() const { … }
VTableLayoutItem::VTableLayoutItem(const UDTLayoutBase &Parent,
std::unique_ptr<PDBSymbolTypeVTable> VT)
: … { … }
UDTLayoutBase::UDTLayoutBase(const UDTLayoutBase *Parent, const PDBSymbol &Sym,
const std::string &Name, uint32_t OffsetInParent,
uint32_t Size, bool IsElided)
: … { … }
uint32_t UDTLayoutBase::tailPadding() const { … }
ClassLayout::ClassLayout(const PDBSymbolTypeUDT &UDT)
: … { … }
ClassLayout::ClassLayout(std::unique_ptr<PDBSymbolTypeUDT> UDT)
: … { … }
uint32_t ClassLayout::immediatePadding() const { … }
BaseClassLayout::BaseClassLayout(const UDTLayoutBase &Parent,
uint32_t OffsetInParent, bool Elide,
std::unique_ptr<PDBSymbolTypeBaseClass> B)
: … { … }
void UDTLayoutBase::initializeChildren(const PDBSymbol &Sym) { … }
bool UDTLayoutBase::hasVBPtrAtOffset(uint32_t Off) const { … }
void UDTLayoutBase::addChildToLayout(std::unique_ptr<LayoutItemBase> Child) { … }