clang 20.0.0git
|
Structure/Class descriptor. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/Record.h"
Classes | |
struct | Base |
Describes a base class. More... | |
struct | Field |
Describes a record field. More... | |
Public Types | |
using | FieldList = llvm::SmallVector< Field, 8 > |
Mapping from identifiers to field descriptors. | |
using | BaseList = llvm::SmallVector< Base, 8 > |
Mapping from identifiers to base classes. | |
using | VirtualBaseList = llvm::SmallVector< Base, 2 > |
List of virtual base classes. | |
using | const_field_iter = FieldList::const_iterator |
using | const_base_iter = BaseList::const_iterator |
using | const_virtual_iter = VirtualBaseList::const_iterator |
Public Member Functions | |
const RecordDecl * | getDecl () const |
Returns the underlying declaration. | |
const std::string | getName () const |
Returns the name of the underlying declaration. | |
bool | isUnion () const |
Checks if the record is a union. | |
unsigned | getSize () const |
Returns the size of the record. | |
unsigned | getFullSize () const |
Returns the full size of the record, including records. | |
const Field * | getField (const FieldDecl *FD) const |
Returns a field. | |
const Base * | getBase (const RecordDecl *FD) const |
Returns a base descriptor. | |
const Base * | getBase (QualType T) const |
Returns a base descriptor. | |
const Base * | getVirtualBase (const RecordDecl *RD) const |
Returns a virtual base descriptor. | |
const CXXDestructorDecl * | getDestructor () const |
Returns the destructor of the record, if any. | |
llvm::iterator_range< const_field_iter > | fields () const |
unsigned | getNumFields () const |
const Field * | getField (unsigned I) const |
llvm::iterator_range< const_base_iter > | bases () const |
unsigned | getNumBases () const |
const Base * | getBase (unsigned I) const |
llvm::iterator_range< const_virtual_iter > | virtual_bases () const |
unsigned | getNumVirtualBases () const |
const Base * | getVirtualBase (unsigned I) const |
void | dump (llvm::raw_ostream &OS, unsigned Indentation=0, unsigned Offset=0) const |
void | dump () const |
Friends | |
class | Program |
using clang::interp::Record::BaseList = llvm::SmallVector<Base, 8> |
using clang::interp::Record::const_base_iter = BaseList::const_iterator |
using clang::interp::Record::const_field_iter = FieldList::const_iterator |
using clang::interp::Record::const_virtual_iter = VirtualBaseList::const_iterator |
using clang::interp::Record::FieldList = llvm::SmallVector<Field, 8> |
using clang::interp::Record::VirtualBaseList = llvm::SmallVector<Base, 2> |
|
inline |
Definition at line 85 of file Record.h.
Referenced by clang::interp::CheckFieldsInitialized(), clang::interp::Context::collectBaseOffset(), clang::interp::copyRecord(), and dump().
|
inline |
LLVM_DUMP_METHOD void Record::dump | ( | llvm::raw_ostream & | OS, |
unsigned | Indentation = 0 , |
||
unsigned | Offset = 0 |
||
) | const |
Definition at line 296 of file Disasm.cpp.
References bases(), fields(), getName(), and virtual_bases().
|
inline |
Definition at line 77 of file Record.h.
Referenced by clang::interp::Pointer::activate(), clang::interp::IntPointer::atOffset(), CheckActive(), clang::interp::CheckFieldsInitialized(), clang::interp::copyRecord(), dump(), clang::interp::Pointer::toRValue(), and clang::interp::Compiler< Emitter >::VisitLambdaExpr().
const Record::Base * Record::getBase | ( | const RecordDecl * | FD | ) | const |
Returns a base descriptor.
Definition at line 45 of file Record.cpp.
Referenced by clang::interp::Pointer::toRValue(), and clang::interp::Compiler< Emitter >::visitInitList().
const Record::Base * Record::getBase | ( | QualType | T | ) | const |
Returns a base descriptor.
Definition at line 51 of file Record.cpp.
References clang::Type::getAs(), and clang::T.
Definition at line 90 of file Record.h.
References getNumBases().
|
inline |
Returns the underlying declaration.
Definition at line 52 of file Record.h.
Referenced by clang::interp::CheckFieldsInitialized(), clang::interp::Pointer::toAPValue(), and clang::interp::MemberPointer::toPointer().
|
inline |
Returns the destructor of the record, if any.
Definition at line 70 of file Record.h.
Referenced by clang::interp::runRecordDestructor().
const Record::Field * Record::getField | ( | const FieldDecl * | FD | ) | const |
Returns a field.
Definition at line 39 of file Record.cpp.
References clang::Mergeable< decl_type >::getFirstDecl().
Referenced by clang::interp::ByteCodeEmitter::compileFunc(), clang::interp::SetThreeWayComparisonField(), clang::interp::MemberPointer::toPointer(), clang::interp::Pointer::toRValue(), clang::interp::Compiler< Emitter >::visitAPValueInitializer(), clang::interp::Compiler< Emitter >::VisitCXXStdInitializerListExpr(), clang::interp::Compiler< Emitter >::visitInitList(), clang::interp::Compiler< Emitter >::VisitMemberExpr(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
|
inline |
const std::string Record::getName | ( | ) | const |
Returns the name of the underlying declaration.
Definition at line 31 of file Record.cpp.
References clang::Decl::getASTContext(), clang::ASTContext::getPrintingPolicy(), and clang::interp::Ret().
Referenced by dump().
|
inline |
Definition at line 89 of file Record.h.
Referenced by clang::interp::Context::collectBaseOffset(), getBase(), and clang::interp::Pointer::toRValue().
|
inline |
Definition at line 81 of file Record.h.
Referenced by clang::interp::SetThreeWayComparisonField(), clang::interp::Pointer::toRValue(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
|
inline |
Definition at line 100 of file Record.h.
Referenced by clang::interp::Pointer::toRValue().
|
inline |
Returns the size of the record.
Definition at line 58 of file Record.h.
Referenced by clang::interp::Program::getOrCreateRecord().
const Record::Base * Record::getVirtualBase | ( | const RecordDecl * | RD | ) | const |
Returns a virtual base descriptor.
Definition at line 59 of file Record.cpp.
Referenced by clang::interp::Pointer::toRValue().
|
inline |
Checks if the record is a union.
Definition at line 56 of file Record.h.
Referenced by CheckActive(), clang::interp::CheckFieldsInitialized(), clang::interp::copyRecord(), clang::interp::Descriptor::isUnion(), and clang::interp::Compiler< Emitter >::visitInitList().
|
inline |