clang 22.0.0git
Classes | Enumerations | Functions
clang::CIRGen Namespace Reference

Classes

class  ABIInfo
 
class  Address
 
class  AggValueSlot
 An aggregate value slot. More...
 
struct  CallArg
 
class  CallArgList
 
struct  CIRGenBitFieldInfo
 Record with information about how a bitfield should be accessed. More...
 
class  CIRGenBuilderTy
 
class  CIRGenCallee
 
class  CIRGenCalleeInfo
 Abstract information about a function or function prototype. More...
 
class  CIRGenCXXABI
 Implements C++ ABI-specific code generation functions. More...
 
class  CIRGenFunction
 
class  CIRGenFunctionInfo
 
class  CIRGenModule
 This class organizes the cross-function state that is used while generating CIR code. More...
 
class  CIRGenRecordLayout
 This class handles record and union layout info while lowering AST types to CIR types. More...
 
struct  CIRGenTypeCache
 This structure provides a set of types that are commonly used during IR emission. More...
 
class  CIRGenTypes
 This class organizes the cross-module state that is used while lowering AST types to CIR types. More...
 
class  CIRGenVTables
 
class  ConstantEmitter
 
class  EHCleanupScope
 A cleanup scope which generates the cleanup blocks lazily. More...
 
class  EHScope
 A protected scope for zero-cost EH handling. More...
 
class  EHScopeStack
 A stack of scopes which respond to exceptions, including cleanups and catch blocks. More...
 
class  FunctionArgList
 Type for representing both the decl and type of parameters to a function. More...
 
class  LValue
 
class  LValueBaseInfo
 
class  RequiredArgs
 A class for recording the number of arguments that a function signature requires. More...
 
class  ReturnValueSlot
 Contains the address where the return value of a function can be stored, and whether the address is volatile or not. More...
 
class  RValue
 This trivial value class is used to represent the result of an expression that is evaluated. More...
 
class  TargetCIRGenInfo
 

Enumerations

enum  ForDefinition_t : bool { NotForDefinition = false , ForDefinition = true }
 
enum class  AlignmentSource { Decl , AttributedType , Type }
 The source of the alignment of an l-value; an expression of confidence in the alignment actually matching the estimate. More...
 
enum  CleanupKind : unsigned {
  EHCleanup = 0x1 , NormalCleanup = 0x2 , NormalAndEHCleanup = EHCleanup | NormalCleanup , LifetimeMarker = 0x8 ,
  NormalEHLifetimeMarker = LifetimeMarker | NormalAndEHCleanup
}
 

Functions

CIRGenCXXABICreateCIRGenItaniumCXXABI (CIRGenModule &cgm)
 Creates and Itanium-family ABI.
 
static bool mayDropFunctionReturn (const ASTContext &astContext, QualType returnType)
 
static void eraseEmptyAndUnusedBlocks (cir::FuncOp func)
 
static std::string getVersionedTmpName (llvm::StringRef name, unsigned cnt)
 
static AlignmentSource getFieldAlignmentSource (AlignmentSource source)
 Given that the base address has the given alignment source, what's our confidence in the alignment of the field?
 
bool isEmptyFieldForLayout (const ASTContext &context, const FieldDecl *fd)
 isEmptyFieldForLayout - Return true if the field is "empty", that is, either a zero-width bit-field or an isEmptyRecordForLayout.
 
bool isEmptyRecordForLayout (const ASTContext &context, QualType t)
 isEmptyRecordForLayout - Return true if a structure contains only empty base classes (per isEmptyRecordForLayout) and fields (per isEmptyFieldForLayout).
 
std::unique_ptr< TargetCIRGenInfocreateX8664TargetCIRGenInfo (CIRGenTypes &cgt)
 

Enumeration Type Documentation

◆ AlignmentSource

enum class clang::CIRGen::AlignmentSource
strong

The source of the alignment of an l-value; an expression of confidence in the alignment actually matching the estimate.

Enumerator
Decl 

The l-value was an access to a declared entity or something equivalently strong, like the address of an array allocated by a language runtime.

AttributedType 

The l-value was considered opaque, so the alignment was determined from a type, but that type was an explicitly-aligned typedef.

Type 

The l-value was considered opaque, so the alignment was determined from a type.

Definition at line 115 of file CIRGenValue.h.

◆ CleanupKind

Enumerator
EHCleanup 

Denotes a cleanup that should run when a scope is exited using exceptional control flow (a throw statement leading to stack unwinding, ).

NormalCleanup 

Denotes a cleanup that should run when a scope is exited using normal control flow (falling off the end of the scope, return, goto, ...).

NormalAndEHCleanup 
LifetimeMarker 
NormalEHLifetimeMarker 

Definition at line 27 of file EHScopeStack.h.

◆ ForDefinition_t

Enumerator
NotForDefinition 
ForDefinition 

Definition at line 52 of file CIRGenModule.h.

Function Documentation

◆ CreateCIRGenItaniumCXXABI()

CIRGenCXXABI * clang::CIRGen::CreateCIRGenItaniumCXXABI ( CIRGenModule cgm)

◆ createX8664TargetCIRGenInfo()

std::unique_ptr< TargetCIRGenInfo > clang::CIRGen::createX8664TargetCIRGenInfo ( CIRGenTypes cgt)

Definition at line 57 of file TargetInfo.cpp.

Referenced by clang::CIRGen::CIRGenModule::getTargetCIRGenInfo().

◆ eraseEmptyAndUnusedBlocks()

static void clang::CIRGen::eraseEmptyAndUnusedBlocks ( cir::FuncOp  func)
static

Definition at line 495 of file CIRGenFunction.cpp.

Referenced by clang::CIRGen::CIRGenFunction::generateCode().

◆ getFieldAlignmentSource()

static AlignmentSource clang::CIRGen::getFieldAlignmentSource ( AlignmentSource  source)
inlinestatic

Given that the base address has the given alignment source, what's our confidence in the alignment of the field?

Definition at line 133 of file CIRGenValue.h.

References Decl.

Referenced by clang::CIRGen::CIRGenFunction::emitLValueForField(), and clang::CIRGen::CIRGenFunction::emitLValueForFieldInitialization().

◆ getVersionedTmpName()

static std::string clang::CIRGen::getVersionedTmpName ( llvm::StringRef  name,
unsigned  cnt 
)
static

◆ isEmptyFieldForLayout()

bool clang::CIRGen::isEmptyFieldForLayout ( const ASTContext context,
const FieldDecl fd 
)

isEmptyFieldForLayout - Return true if the field is "empty", that is, either a zero-width bit-field or an isEmptyRecordForLayout.

Definition at line 30 of file TargetInfo.cpp.

References clang::ValueDecl::getType(), isEmptyRecordForLayout(), clang::FieldDecl::isUnnamedBitField(), and clang::FieldDecl::isZeroLengthBitField().

Referenced by isEmptyRecordForLayout().

◆ isEmptyRecordForLayout()

bool clang::CIRGen::isEmptyRecordForLayout ( const ASTContext context,
QualType  t 
)

isEmptyRecordForLayout - Return true if a structure contains only empty base classes (per isEmptyRecordForLayout) and fields (per isEmptyFieldForLayout).

Note, C++ record fields are considered empty if the [[no_unique_address]] attribute would have made them empty.

Definition at line 7 of file TargetInfo.cpp.

References clang::Type::getAsRecordDecl(), isEmptyFieldForLayout(), and isEmptyRecordForLayout().

Referenced by isEmptyFieldForLayout(), and isEmptyRecordForLayout().

◆ mayDropFunctionReturn()

static bool clang::CIRGen::mayDropFunctionReturn ( const ASTContext astContext,
QualType  returnType 
)
static