clang  10.0.0svn
Classes | Public Types | Public Member Functions | Friends | List of all members
clang::interp::Record Class Reference

Structure/Class descriptor. More...

#include "/opt/doxygen-docs/src/llvm/tools/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. More...
 
using BaseList = llvm::SmallVector< Base, 8 >
 Mapping from identifiers to base classes. More...
 
using VirtualBaseList = llvm::SmallVector< Base, 2 >
 List of virtual base classes. More...
 
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. More...
 
bool isUnion () const
 Checks if the record is a union. More...
 
unsigned getSize () const
 Returns the size of the record. More...
 
unsigned getFullSize () const
 Returns the full size of the record, including records. More...
 
const FieldgetField (const FieldDecl *FD) const
 Returns a field. More...
 
const BasegetBase (const RecordDecl *FD) const
 Returns a base descriptor. More...
 
const BasegetVirtualBase (const RecordDecl *RD) const
 Returns a virtual base descriptor. More...
 
llvm::iterator_range< const_field_iterfields () const
 
unsigned getNumFields ()
 
FieldgetField (unsigned I)
 
llvm::iterator_range< const_base_iterbases () const
 
unsigned getNumBases ()
 
BasegetBase (unsigned I)
 
llvm::iterator_range< const_virtual_itervirtual_bases () const
 
unsigned getNumVirtualBases ()
 
BasegetVirtualBase (unsigned I)
 

Friends

class Program
 

Detailed Description

Structure/Class descriptor.

Definition at line 23 of file Record.h.

Member Typedef Documentation

◆ BaseList

Mapping from identifiers to base classes.

Definition at line 43 of file Record.h.

◆ const_base_iter

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

Definition at line 71 of file Record.h.

◆ const_field_iter

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

Definition at line 63 of file Record.h.

◆ const_virtual_iter

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

Definition at line 79 of file Record.h.

◆ FieldList

Mapping from identifiers to field descriptors.

Definition at line 41 of file Record.h.

◆ VirtualBaseList

List of virtual base classes.

Definition at line 45 of file Record.h.

Member Function Documentation

◆ bases()

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

Definition at line 72 of file Record.h.

Referenced by ctorRecord(), and dtorRecord().

◆ fields()

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

◆ getBase() [1/2]

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

Returns a base descriptor.

Definition at line 36 of file Record.cpp.

Referenced by clang::interp::EvalEmitter::fallthrough(), and getFullSize().

◆ getBase() [2/2]

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

Definition at line 77 of file Record.h.

◆ getDecl()

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

Returns the underlying declaration.

Definition at line 49 of file Record.h.

References clang::interp::Record::Field::Decl.

Referenced by isUnion().

◆ getField() [1/2]

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

Returns a field.

Definition at line 30 of file Record.cpp.

Referenced by clang::interp::EvalEmitter::fallthrough(), and getFullSize().

◆ getField() [2/2]

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

Definition at line 69 of file Record.h.

◆ getFullSize()

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

Returns the full size of the record, including records.

Definition at line 55 of file Record.h.

References getBase(), getField(), and getVirtualBase().

◆ getNumBases()

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

Definition at line 76 of file Record.h.

Referenced by clang::interp::EvalEmitter::fallthrough().

◆ getNumFields()

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

Definition at line 68 of file Record.h.

Referenced by clang::interp::EvalEmitter::fallthrough().

◆ getNumVirtualBases()

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

Definition at line 84 of file Record.h.

Referenced by clang::interp::EvalEmitter::fallthrough().

◆ getSize()

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

Returns the size of the record.

Definition at line 53 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.

Referenced by clang::interp::EvalEmitter::fallthrough(), getFullSize(), and clang::interp::VirtBaseHelper().

◆ getVirtualBase() [2/2]

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

Definition at line 85 of file Record.h.

◆ isUnion()

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

Checks if the record is a union.

Definition at line 51 of file Record.h.

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

Referenced by ctorRecord().

◆ virtual_bases()

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

Definition at line 80 of file Record.h.

Referenced by ctorRecord(), and dtorRecord().

Friends And Related Function Documentation

◆ Program

friend class Program
friend

Definition at line 94 of file Record.h.


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