LLVM 24.0.0git
llvm::abi::RecordType Class Reference

#include "llvm/ABI/Types.h"

Inheritance diagram for llvm::abi::RecordType:
[legend]

Public Member Functions

 RecordType (ArrayRef< FieldInfo > StructFields, ArrayRef< FieldInfo > Bases, ArrayRef< FieldInfo > VBases, TypeSize Size, Align Align, StructPacking Pack=StructPacking::Default, RecordFlags RecFlags=RecordFlags::None)
uint32_t getNumFields () const
StructPacking getPacking () const
bool isUnion () const
bool isCXXRecord () const
bool isPolymorphic () const
bool canPassInRegisters () const
bool hasFlexibleArrayMember () const
uint32_t getNumBaseClasses () const
uint32_t getNumVirtualBaseClasses () const
bool isTransparentUnion () const
ArrayRef< FieldInfogetFields () const
ArrayRef< FieldInfogetBaseClasses () const
ArrayRef< FieldInfogetVirtualBaseClasses () const
LLVM_ABI bool isEmpty () const
LLVM_ABI const FieldInfogetElementContainingOffset (unsigned OffsetInBits) const
 Returns the field, base, or virtual base whose extent contains OffsetInBits, or nullptr if no such element exists.
Public Member Functions inherited from llvm::abi::Type
TypeKind getKind () const
TypeSize getSizeInBits () const
Align getAlignment () const
TypeSize getTypeAllocSize () const
bool isVoid () const
bool isAtomic () const
bool isInteger () const
bool isFloat () const
bool isPointer () const
bool isArray () const
bool isVector () const
bool isTuple () const
bool isRecord () const
bool isMemberPointer () const
bool isComplex () const
bool isZeroSize () const

Static Public Member Functions

static bool classof (const Type *T)

Additional Inherited Members

Protected Member Functions inherited from llvm::abi::Type
 Type (TypeKind K, TypeSize SizeInBits, Align ABIAlign)
Protected Attributes inherited from llvm::abi::Type
TypeKind Kind
TypeSize SizeInBits
Align ABIAlignment

Detailed Description

Definition at line 352 of file Types.h.

Constructor & Destructor Documentation

◆ RecordType()

llvm::abi::RecordType::RecordType ( ArrayRef< FieldInfo > StructFields,
ArrayRef< FieldInfo > Bases,
ArrayRef< FieldInfo > VBases,
TypeSize Size,
Align Align,
StructPacking Pack = StructPacking::Default,
RecordFlags RecFlags = RecordFlags::None )
inline

Member Function Documentation

◆ canPassInRegisters()

bool llvm::abi::RecordType::canPassInRegisters ( ) const
inline

Definition at line 380 of file Types.h.

References llvm::abi::CanPassInRegisters.

Referenced by llvm::abi::TargetInfo::getRecordArgABI(), and isEmpty().

◆ classof()

bool llvm::abi::RecordType::classof ( const Type * T)
inlinestatic

Definition at line 408 of file Types.h.

References llvm::abi::Record, T, and llvm::abi::Type::Type().

◆ getBaseClasses()

ArrayRef< FieldInfo > llvm::abi::RecordType::getBaseClasses ( ) const
inline

Definition at line 395 of file Types.h.

Referenced by getElementContainingOffset(), and isEmpty().

◆ getElementContainingOffset()

const FieldInfo * RecordType::getElementContainingOffset ( unsigned OffsetInBits) const

Returns the field, base, or virtual base whose extent contains OffsetInBits, or nullptr if no such element exists.

Empty bases and unnamed bitfields are skipped.

Definition at line 41 of file Types.cpp.

References llvm::sampleprof::Base, Contains(), llvm::dyn_cast(), getBaseClasses(), getFields(), getVirtualBaseClasses(), and Size.

◆ getFields()

ArrayRef< FieldInfo > llvm::abi::RecordType::getFields ( ) const
inline

Definition at line 394 of file Types.h.

Referenced by getElementContainingOffset(), isEmpty(), and llvm::abi::reduceUnionForX8664().

◆ getNumBaseClasses()

uint32_t llvm::abi::RecordType::getNumBaseClasses ( ) const
inline

Definition at line 387 of file Types.h.

◆ getNumFields()

uint32_t llvm::abi::RecordType::getNumFields ( ) const
inline

Definition at line 368 of file Types.h.

◆ getNumVirtualBaseClasses()

uint32_t llvm::abi::RecordType::getNumVirtualBaseClasses ( ) const
inline

Definition at line 388 of file Types.h.

Referenced by isEmpty().

◆ getPacking()

StructPacking llvm::abi::RecordType::getPacking ( ) const
inline

Definition at line 369 of file Types.h.

◆ getVirtualBaseClasses()

ArrayRef< FieldInfo > llvm::abi::RecordType::getVirtualBaseClasses ( ) const
inline

Definition at line 396 of file Types.h.

Referenced by getElementContainingOffset().

◆ hasFlexibleArrayMember()

bool llvm::abi::RecordType::hasFlexibleArrayMember ( ) const
inline

Definition at line 383 of file Types.h.

References llvm::abi::HasFlexibleArrayMember.

Referenced by isEmpty().

◆ isCXXRecord()

bool llvm::abi::RecordType::isCXXRecord ( ) const
inline

Definition at line 374 of file Types.h.

References llvm::abi::IsCXXRecord.

◆ isEmpty()

◆ isPolymorphic()

bool llvm::abi::RecordType::isPolymorphic ( ) const
inline

Definition at line 377 of file Types.h.

References llvm::abi::IsPolymorphic.

◆ isTransparentUnion()

bool llvm::abi::RecordType::isTransparentUnion ( ) const
inline

Definition at line 391 of file Types.h.

References llvm::abi::IsTransparent.

Referenced by llvm::abi::reduceUnionForX8664().

◆ isUnion()

bool llvm::abi::RecordType::isUnion ( ) const
inline

Definition at line 371 of file Types.h.

References llvm::abi::IsUnion.

Referenced by llvm::abi::reduceUnionForX8664().


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