|
clang 24.0.0git
|
Structure/Class descriptor. More...
#include "/work/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 | const_field_iter = ArrayRef<Field>::const_iterator |
| using | const_base_iter = ArrayRef<Base>::const_iterator |
Public Member Functions | |
| const RecordDecl * | getDecl () const |
| Returns the underlying declaration. | |
| std::string | getName () const |
| Returns the name of the underlying declaration. | |
| bool | isUnion () const |
| Checks if the record is a union. | |
| bool | isAnonymousUnion () const |
| Checks if the record is an anonymous union. | |
| unsigned | getSize () const |
| Returns the size of the record. | |
| unsigned | getFullSize () const |
| Returns the full size of the record, including records. | |
| const CXXDestructorDecl * | getDestructor () const |
| Returns the destructor of the record, if any. | |
| bool | hasPtrField () const |
| If this record (or any of its bases) contains a field of type PT_Ptr. | |
| bool | hasTrivialDtor () const |
| Returns true for anonymous unions and records with no destructor or for those with a trivial destructor. | |
| llvm::iterator_range< const_field_iter > | fields () const |
| unsigned | getNumFields () const |
| const Field * | getField (unsigned I) const |
| const Field * | findField (unsigned Offset) const |
| Find a field with the given offset. | |
| const Field * | getField (const FieldDecl *FD) const |
| Returns a field. | |
| llvm::iterator_range< const_base_iter > | bases () const |
| unsigned | getNumBases () const |
| const Base * | getBase (unsigned I) const |
| const Base * | getBase (QualType T) const |
| Returns a base descriptor. | |
| const Base * | getBase (const RecordDecl *RD) const |
| Returns a base descriptor. | |
| const Base * | getBaseOrNull (const RecordDecl *RD) const |
| const Base * | findBase (unsigned Offset) const |
| llvm::iterator_range< const_base_iter > | virtual_bases () const |
| unsigned | getNumVirtualBases () const |
| const Base * | getVirtualBase (unsigned I) const |
| const Base * | findVirtualBase (const RecordDecl *RD) const |
| Returns a virtual base descriptor. | |
| void | dump (llvm::raw_ostream &OS, unsigned Indentation=0, unsigned Offset=0) const |
| void | dump () const |
Friends | |
| class | Program |
|
inline |
Definition at line 107 of file Record.h.
Referenced by clang::interp::Context::collectBaseOffset(), ctorRecord(), destroyBase(), dtorRecord(), dump(), and initBase().
|
inline |
| LLVM_DUMP_METHOD void Record::dump | ( | llvm::raw_ostream & | OS, |
| unsigned | Indentation = 0, | ||
| unsigned | Offset = 0 ) const |
Definition at line 574 of file Disasm.cpp.
References bases(), fields(), getName(), clang::Indent(), and virtual_bases().
|
inline |
Definition at line 92 of file Record.h.
Referenced by ctorRecord(), destroyBase(), dtorRecord(), dump(), initBase(), and toRValue().
| const Record::Base * Record::findBase | ( | unsigned | Offset | ) | const |
Definition at line 66 of file Record.cpp.
| const Record::Field * Record::findField | ( | unsigned | Offset | ) | const |
Find a field with the given offset.
This does a linear search, so use sparingly.
Definition at line 41 of file Record.cpp.
| const Record::Base * Record::findVirtualBase | ( | const RecordDecl * | RD | ) | const |
Returns a virtual base descriptor.
Definition at line 75 of file Record.cpp.
Referenced by clang::interp::Compiler< Emitter >::visitAPValue().
| const Record::Base * Record::getBase | ( | const RecordDecl * | RD | ) | const |
Returns a base descriptor.
Definition at line 50 of file Record.cpp.
| const Record::Base * Record::getBase | ( | QualType | T | ) | const |
| const Record::Base * Record::getBaseOrNull | ( | const RecordDecl * | RD | ) | const |
Definition at line 56 of file Record.cpp.
Referenced by clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
Returns the underlying declaration.
Definition at line 67 of file Record.h.
Referenced by clang::interp::IntPointer::baseCast(), computeFullDescSize(), clang::interp::GetPtrDerivedPop(), clang::interp::Pointer::toAPValue(), and clang::interp::MemberPointer::toPointer().
|
inline |
Returns the destructor of the record, if any.
Definition at line 79 of file Record.h.
Referenced by hasTrivialDtor().
Returns a field.
Definition at line 102 of file Record.h.
References clang::FieldDecl::getFieldIndex().
Definition at line 97 of file Record.h.
Referenced by clang::interp::MemberPointer::toPointer(), toRValue(), and clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
| std::string Record::getName | ( | ) | const |
Returns the name of the underlying declaration.
Definition at line 26 of file Record.cpp.
References clang::interp::Ret().
Referenced by dump().
|
inline |
Definition at line 111 of file Record.h.
Referenced by clang::interp::Context::collectBaseOffset(), getBase(), and toRValue().
|
inline |
Definition at line 96 of file Record.h.
Referenced by pointsToLastObject(), and toRValue().
|
inline |
Definition at line 127 of file Record.h.
Referenced by clang::interp::checkConstructor(), and toRValue().
|
inline |
Returns the size of the record.
Definition at line 75 of file Record.h.
Referenced by clang::interp::Program::getOrCreateRecord().
Definition at line 128 of file Record.h.
Referenced by toRValue().
|
inline |
If this record (or any of its bases) contains a field of type PT_Ptr.
Definition at line 85 of file Record.h.
Referenced by clang::interp::Program::getOrCreateRecord(), clang::interp::isOrHasPtr(), and clang::interp::lvalFields().
| bool Record::hasTrivialDtor | ( | ) | const |
Returns true for anonymous unions and records with no destructor or for those with a trivial destructor.
Definition at line 34 of file Record.cpp.
References clang::interp::Dtor, getDestructor(), and isAnonymousUnion().
|
inline |
Checks if the record is an anonymous union.
Definition at line 73 of file Record.h.
Referenced by hasTrivialDtor(), and clang::interp::Memcpy().
|
inline |
Checks if the record is a union.
Definition at line 71 of file Record.h.
Referenced by clang::interp::PtrView::activate(), initBase(), and clang::interp::Memcpy().
|
inline |
Definition at line 123 of file Record.h.
Referenced by ctorRecord(), dtorRecord(), and dump().
|
friend |