LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::codeview::TypeDumpVisitor Class Reference

Dumper for CodeView type streams found in COFF object files and PDB files. More...

#include "llvm/DebugInfo/CodeView/TypeDumpVisitor.h"

Inheritance diagram for llvm::codeview::TypeDumpVisitor:
Inheritance graph
[legend]
Collaboration diagram for llvm::codeview::TypeDumpVisitor:
Collaboration graph
[legend]

Public Member Functions

 TypeDumpVisitor (TypeCollection &TpiTypes, ScopedPrinter *W, bool PrintRecordBytes)
 
void setIpiTypes (TypeCollection &Types)
 When dumping types from an IPI stream in a PDB, a type index may refer to a type or an item ID. More...
 
void printTypeIndex (StringRef FieldName, TypeIndex TI) const
 
void printItemIndex (StringRef FieldName, TypeIndex TI) const
 
Error visitUnknownType (CVType &Record) override
 Action to take on unknown types. By default, they are ignored. More...
 
Error visitUnknownMember (CVMemberRecord &Record) override
 
Error visitTypeBegin (CVType &Record) override
 Paired begin/end actions for all types. More...
 
Error visitTypeBegin (CVType &Record, TypeIndex Index) override
 
Error visitTypeEnd (CVType &Record) override
 
Error visitMemberBegin (CVMemberRecord &Record) override
 
Error visitMemberEnd (CVMemberRecord &Record) override
 
- Public Member Functions inherited from llvm::codeview::TypeVisitorCallbacks
virtual ~TypeVisitorCallbacks ()=default
 

Detailed Description

Dumper for CodeView type streams found in COFF object files and PDB files.

Definition at line 27 of file TypeDumpVisitor.h.

Constructor & Destructor Documentation

◆ TypeDumpVisitor()

llvm::codeview::TypeDumpVisitor::TypeDumpVisitor ( TypeCollection TpiTypes,
ScopedPrinter W,
bool  PrintRecordBytes 
)
inline

Definition at line 29 of file TypeDumpVisitor.h.

Member Function Documentation

◆ printItemIndex()

void TypeDumpVisitor::printItemIndex ( StringRef  FieldName,
TypeIndex  TI 
) const

Definition at line 167 of file TypeDumpVisitor.cpp.

References llvm::codeview::printTypeIndex().

Referenced by setIpiTypes(), and visitMemberEnd().

◆ printTypeIndex()

void TypeDumpVisitor::printTypeIndex ( StringRef  FieldName,
TypeIndex  TI 
) const

Definition at line 163 of file TypeDumpVisitor.cpp.

References llvm::codeview::printTypeIndex().

Referenced by setIpiTypes(), visitMemberEnd(), and visitUnknownType().

◆ setIpiTypes()

void llvm::codeview::TypeDumpVisitor::setIpiTypes ( TypeCollection Types)
inline

When dumping types from an IPI stream in a PDB, a type index may refer to a type or an item ID.

The dumper will lookup the "name" of the index in the item database if appropriate. If ItemDB is null, it will use TypeDB, which is correct when dumping types from an object file (/Z7).

Definition at line 37 of file TypeDumpVisitor.h.

References printItemIndex(), printTypeIndex(), visitMemberBegin(), visitMemberEnd(), visitTypeBegin(), visitTypeEnd(), visitUnknownMember(), and visitUnknownType().

◆ visitMemberBegin()

Error TypeDumpVisitor::visitMemberBegin ( CVMemberRecord Record)
overridevirtual

◆ visitMemberEnd()

Error TypeDumpVisitor::visitMemberEnd ( CVMemberRecord Record)
overridevirtual

Reimplemented from llvm::codeview::TypeVisitorCallbacks.

Definition at line 203 of file TypeDumpVisitor.cpp.

References Arg, llvm::AMDGPU::HSAMD::Kernel::Key::Args, Arguments, llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, llvm::codeview::CVMemberRecord::Data, llvm::codeview::FieldListRecord::Data, llvm::codeview::EC, llvm::formatv(), llvm::codeview::MemberAttributes::getAccess(), llvm::codeview::TypeServer2Record::getAge(), llvm::codeview::BuildInfoRecord::getArgs(), llvm::codeview::ProcedureRecord::getArgumentList(), llvm::codeview::MemberFunctionRecord::getArgumentList(), llvm::codeview::BitFieldRecord::getBitOffset(), llvm::codeview::BitFieldRecord::getBitSize(), llvm::codeview::getBytesAsCharacters(), llvm::codeview::ProcedureRecord::getCallConv(), llvm::codeview::MemberFunctionRecord::getCallConv(), llvm::codeview::MemberFunctionRecord::getClassType(), llvm::codeview::MemberFuncIdRecord::getClassType(), llvm::codeview::VFTableRecord::getCompleteClass(), llvm::codeview::MemberPointerInfo::getContainingType(), llvm::codeview::ClassRecord::getDerivationList(), llvm::codeview::ArrayRecord::getElementType(), llvm::codeview::VFTableShapeRecord::getEntryCount(), llvm::codeview::TagRecord::getFieldList(), llvm::codeview::MemberAttributes::getFlags(), llvm::codeview::MemberFuncIdRecord::getFunctionType(), llvm::codeview::FuncIdRecord::getFunctionType(), llvm::codeview::TypeServer2Record::getGuid(), llvm::codeview::StringIdRecord::getId(), llvm::codeview::ArrayRecord::getIndexType(), llvm::codeview::ArgListRecord::getIndices(), llvm::codeview::StringListRecord::getIndices(), llvm::codeview::UdtSourceLineRecord::getLineNumber(), llvm::codeview::UdtModSourceLineRecord::getLineNumber(), llvm::codeview::TagRecord::getMemberCount(), llvm::codeview::PointerRecord::getMemberInfo(), llvm::codeview::MemberAttributes::getMethodKind(), llvm::codeview::VFTableRecord::getMethodNames(), llvm::codeview::MethodOverloadListRecord::getMethods(), llvm::codeview::PointerRecord::getMode(), llvm::codeview::ModifierRecord::getModifiedType(), llvm::codeview::ModifierRecord::getModifiers(), llvm::codeview::UdtModSourceLineRecord::getModule(), llvm::codeview::MemberFuncIdRecord::getName(), llvm::codeview::ArrayRecord::getName(), llvm::codeview::TagRecord::getName(), llvm::codeview::TypeServer2Record::getName(), llvm::codeview::FuncIdRecord::getName(), llvm::codeview::VFTableRecord::getName(), llvm::codeview::ProcedureRecord::getOptions(), llvm::codeview::MemberFunctionRecord::getOptions(), llvm::codeview::PointerRecord::getOptions(), llvm::codeview::TagRecord::getOptions(), llvm::codeview::VFTableRecord::getOverriddenVTable(), llvm::codeview::ProcedureRecord::getParameterCount(), llvm::codeview::MemberFunctionRecord::getParameterCount(), llvm::codeview::FuncIdRecord::getParentScope(), llvm::codeview::PointerRecord::getPointerKind(), llvm::codeview::PointerRecord::getReferentType(), llvm::codeview::MemberPointerInfo::getRepresentation(), llvm::codeview::ProcedureRecord::getReturnType(), llvm::codeview::MemberFunctionRecord::getReturnType(), llvm::codeview::PointerRecord::getSize(), llvm::codeview::ArrayRecord::getSize(), llvm::codeview::ClassRecord::getSize(), llvm::codeview::UnionRecord::getSize(), llvm::codeview::UdtSourceLineRecord::getSourceFile(), llvm::codeview::UdtModSourceLineRecord::getSourceFile(), llvm::codeview::StringIdRecord::getString(), llvm::codeview::MemberFunctionRecord::getThisPointerAdjustment(), llvm::codeview::MemberFunctionRecord::getThisType(), llvm::codeview::BitFieldRecord::getType(), llvm::codeview::UdtSourceLineRecord::getUDT(), llvm::codeview::UdtModSourceLineRecord::getUDT(), llvm::codeview::EnumRecord::getUnderlyingType(), llvm::codeview::TagRecord::getUniqueName(), llvm::codeview::VFTableRecord::getVFPtrOffset(), llvm::codeview::ClassRecord::getVTableShape(), llvm::codeview::HasUniqueName, I, llvm::codeview::PointerRecord::isConst(), llvm::codeview::PointerRecord::isFlat(), llvm::codeview::PointerRecord::isPointerToMember(), llvm::codeview::PointerRecord::isUnaligned(), llvm::codeview::PointerRecord::isVolatile(), Kind, llvm::makeArrayRef(), MI, N, llvm::codeview::None, llvm::ScopedPrinter::printBinaryBlock(), llvm::ScopedPrinter::printEnum(), llvm::ScopedPrinter::printFlags(), llvm::ScopedPrinter::printHex(), printItemIndex(), llvm::ScopedPrinter::printNumber(), llvm::ScopedPrinter::printString(), printTypeIndex(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, llvm::ScopedPrinter::startLine(), llvm::pdb::String, llvm::Error::success(), llvm::ScopedPrinter::unindent(), llvm::codeview::Vanilla, visitKnownRecord(), and llvm::codeview::visitMemberRecordStream().

Referenced by setIpiTypes().

◆ visitTypeBegin() [1/2]

Error TypeDumpVisitor::visitTypeBegin ( CVType Record)
overridevirtual

Paired begin/end actions for all types.

Receives all record data, including the fixed-length record prefix.

Reimplemented from llvm::codeview::TypeVisitorCallbacks.

Definition at line 171 of file TypeDumpVisitor.cpp.

References llvm::codeview::TypeIndex::fromArrayIndex(), and llvm::codeview::TypeCollection::size().

Referenced by setIpiTypes().

◆ visitTypeBegin() [2/2]

Error TypeDumpVisitor::visitTypeBegin ( CVType Record,
TypeIndex  Index 
)
overridevirtual

◆ visitTypeEnd()

Error TypeDumpVisitor::visitTypeEnd ( CVType Record)
overridevirtual

◆ visitUnknownMember()

Error TypeDumpVisitor::visitUnknownMember ( CVMemberRecord Record)
overridevirtual

◆ visitUnknownType()

Error TypeDumpVisitor::visitUnknownType ( CVType Record)
overridevirtual

Action to take on unknown types. By default, they are ignored.

Reimplemented from llvm::codeview::TypeVisitorCallbacks.

Definition at line 459 of file TypeDumpVisitor.cpp.

References llvm::codeview::CVRecord< Kind >::content(), llvm::tgtok::Field, llvm::codeview::OneMethodRecord::getAccess(), llvm::codeview::DataMemberRecord::getAccess(), llvm::codeview::StaticDataMemberRecord::getAccess(), llvm::codeview::EnumeratorRecord::getAccess(), llvm::codeview::BaseClassRecord::getAccess(), llvm::codeview::VirtualBaseClassRecord::getAccess(), llvm::codeview::BaseClassRecord::getBaseOffset(), llvm::codeview::BaseClassRecord::getBaseType(), llvm::codeview::VirtualBaseClassRecord::getBaseType(), llvm::codeview::ListContinuationRecord::getContinuationIndex(), llvm::codeview::DataMemberRecord::getFieldOffset(), llvm::codeview::OneMethodRecord::getMethodKind(), llvm::codeview::OverloadedMethodRecord::getMethodList(), llvm::codeview::NestedTypeRecord::getName(), llvm::codeview::OneMethodRecord::getName(), llvm::codeview::OverloadedMethodRecord::getName(), llvm::codeview::DataMemberRecord::getName(), llvm::codeview::StaticDataMemberRecord::getName(), llvm::codeview::EnumeratorRecord::getName(), llvm::codeview::NestedTypeRecord::getNestedType(), llvm::codeview::OverloadedMethodRecord::getNumOverloads(), llvm::codeview::OneMethodRecord::getOptions(), llvm::codeview::OneMethodRecord::getType(), llvm::codeview::DataMemberRecord::getType(), llvm::codeview::StaticDataMemberRecord::getType(), llvm::codeview::VFPtrRecord::getType(), llvm::codeview::EnumeratorRecord::getValue(), llvm::codeview::VirtualBaseClassRecord::getVBPtrOffset(), llvm::codeview::VirtualBaseClassRecord::getVBPtrType(), llvm::codeview::OneMethodRecord::getVFTableOffset(), llvm::codeview::VirtualBaseClassRecord::getVTableIndex(), llvm::codeview::OneMethodRecord::isIntroducingVirtual(), llvm::codeview::CVRecord< Kind >::kind(), llvm::makeArrayRef(), llvm::codeview::LabelRecord::Mode, llvm::codeview::Nested, llvm::codeview::None, llvm::ScopedPrinter::printEnum(), llvm::ScopedPrinter::printHex(), llvm::ScopedPrinter::printNumber(), llvm::ScopedPrinter::printString(), printTypeIndex(), llvm::ArrayRef< T >::size(), llvm::Error::success(), llvm::codeview::Vanilla, visitKnownMember(), and visitKnownRecord().

Referenced by setIpiTypes().


The documentation for this class was generated from the following files: