clang 17.0.0git
Classes | Public Types | Public Member Functions | Friends | List of all members
clang::interp::Record Class Referencefinal

Structure/Class descriptor. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/Interp/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 RecordDeclgetDecl () 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 FieldgetField (const FieldDecl *FD) const
 Returns a field.
 
const BasegetBase (const RecordDecl *FD) const
 Returns a base descriptor.
 
const BasegetVirtualBase (const RecordDecl *RD) const
 Returns a virtual base descriptor.
 
const CXXDestructorDeclgetDestructor () const
 
llvm::iterator_range< const_field_iterfields () const
 
unsigned getNumFields () const
 
const FieldgetField (unsigned I) const
 
FieldgetField (unsigned I)
 
llvm::iterator_range< const_base_iterbases () const
 
unsigned getNumBases () const
 
BasegetBase (unsigned I)
 
llvm::iterator_range< const_virtual_itervirtual_bases () const
 
unsigned getNumVirtualBases () const
 
BasegetVirtualBase (unsigned I)
 

Friends

class Program
 

Detailed Description

Structure/Class descriptor.

Definition at line 25 of file Record.h.

Member Typedef Documentation

◆ BaseList

Mapping from identifiers to base classes.

Definition at line 45 of file Record.h.

◆ const_base_iter

using clang::interp::Record::const_base_iter = BaseList::const_iterator

Definition at line 82 of file Record.h.

◆ const_field_iter

using clang::interp::Record::const_field_iter = FieldList::const_iterator

Definition at line 73 of file Record.h.

◆ const_virtual_iter

using clang::interp::Record::const_virtual_iter = VirtualBaseList::const_iterator

Definition at line 90 of file Record.h.

◆ FieldList

Mapping from identifiers to field descriptors.

Definition at line 43 of file Record.h.

◆ VirtualBaseList

List of virtual base classes.

Definition at line 47 of file Record.h.

Member Function Documentation

◆ bases()

llvm::iterator_range< const_base_iter > clang::interp::Record::bases ( ) const
inline

Definition at line 83 of file Record.h.

Referenced by ctorRecord(), and dtorRecord().

◆ fields()

llvm::iterator_range< const_field_iter > clang::interp::Record::fields ( ) const
inline

Definition at line 74 of file Record.h.

Referenced by clang::interp::CheckFieldsInitialized(), ctorRecord(), dtorRecord(), and moveRecord().

◆ getBase() [1/2]

const Record::Base * Record::getBase ( const RecordDecl FD) const

◆ getBase() [2/2]

Base * clang::interp::Record::getBase ( unsigned  I)
inline

Definition at line 88 of file Record.h.

◆ getDecl()

const RecordDecl * clang::interp::Record::getDecl ( ) const
inline

Returns the underlying declaration.

Definition at line 51 of file Record.h.

Referenced by isUnion().

◆ getDestructor()

const CXXDestructorDecl * clang::interp::Record::getDestructor ( ) const
inline

Definition at line 67 of file Record.h.

◆ getField() [1/3]

const Record::Field * Record::getField ( const FieldDecl FD) const

◆ getField() [2/3]

Field * clang::interp::Record::getField ( unsigned  I)
inline

Definition at line 80 of file Record.h.

◆ getField() [3/3]

const Field * clang::interp::Record::getField ( unsigned  I) const
inline

Definition at line 79 of file Record.h.

◆ getFullSize()

unsigned clang::interp::Record::getFullSize ( ) const
inline

Returns the full size of the record, including records.

Definition at line 59 of file Record.h.

◆ getName()

const std::string clang::interp::Record::getName ( ) const
inline

Returns the name of the underlying declaration.

Definition at line 53 of file Record.h.

◆ getNumBases()

unsigned clang::interp::Record::getNumBases ( ) const
inline

Definition at line 87 of file Record.h.

◆ getNumFields()

unsigned clang::interp::Record::getNumFields ( ) const
inline

Definition at line 78 of file Record.h.

Referenced by CheckActive().

◆ getNumVirtualBases()

unsigned clang::interp::Record::getNumVirtualBases ( ) const
inline

Definition at line 95 of file Record.h.

◆ getSize()

unsigned clang::interp::Record::getSize ( ) const
inline

Returns the size of the record.

Definition at line 57 of file Record.h.

Referenced by clang::interp::Program::getOrCreateRecord().

◆ getVirtualBase() [1/2]

const Record::Base * Record::getVirtualBase ( const RecordDecl RD) const

Returns a virtual base descriptor.

Definition at line 42 of file Record.cpp.

◆ getVirtualBase() [2/2]

Base * clang::interp::Record::getVirtualBase ( unsigned  I)
inline

Definition at line 96 of file Record.h.

◆ isUnion()

bool clang::interp::Record::isUnion ( ) const
inline

Checks if the record is a union.

Definition at line 55 of file Record.h.

References getDecl(), and clang::TagDecl::isUnion().

Referenced by CheckActive(), and ctorRecord().

◆ virtual_bases()

llvm::iterator_range< const_virtual_iter > clang::interp::Record::virtual_bases ( ) const
inline

Definition at line 91 of file Record.h.

Referenced by ctorRecord(), and dtorRecord().

Friends And Related Function Documentation

◆ Program

friend class Program
friend

Definition at line 105 of file Record.h.


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