LLVM  14.0.0git
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 26 of file TypeDumpVisitor.h.

Constructor & Destructor Documentation

◆ TypeDumpVisitor()

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

Definition at line 28 of file TypeDumpVisitor.h.

Member Function Documentation

◆ printItemIndex()

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

Definition at line 165 of file TypeDumpVisitor.cpp.

References llvm::codeview::printTypeIndex().

◆ printTypeIndex()

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

Definition at line 161 of file TypeDumpVisitor.cpp.

References llvm::codeview::printTypeIndex().

◆ 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 36 of file TypeDumpVisitor.h.

◆ visitMemberBegin()

Error TypeDumpVisitor::visitMemberBegin ( CVMemberRecord Record)
overridevirtual

◆ visitMemberEnd()

Error TypeDumpVisitor::visitMemberEnd ( CVMemberRecord Record)
overridevirtual

◆ 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 169 of file TypeDumpVisitor.cpp.

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

◆ 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 LeafTypeNames, llvm::makeArrayRef(), llvm::ScopedPrinter::printEnum(), llvm::ScopedPrinter::printNumber(), and llvm::Error::success().


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