clang  17.0.0git
Public Member Functions | Protected Attributes | List of all members
clang::CodeGen::SwiftABIInfo Class Reference

Target specific hooks for defining how a type should be passed or returned from functions with one of the Swift calling conventions. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/ABIInfo.h"

Collaboration diagram for clang::CodeGen::SwiftABIInfo:
Collaboration graph
[legend]

Public Member Functions

 SwiftABIInfo (CodeGen::CodeGenTypes &CGT, bool SwiftErrorInRegister)
 
virtual ~SwiftABIInfo ()
 
virtual bool shouldPassIndirectly (ArrayRef< llvm::Type * > ComponentTys, bool AsReturnValue) const
 Returns true if an aggregate which expands to the given type sequence should be passed / returned indirectly. More...
 
virtual bool isLegalVectorType (CharUnits VectorSize, llvm::Type *EltTy, unsigned NumElts) const
 Returns true if the given vector type is legal from Swift's calling convention perspective. More...
 
bool isSwiftErrorInRegister () const
 Returns true if swifterror is lowered to a register by the target ABI. More...
 

Protected Attributes

CodeGenTypesCGT
 
bool SwiftErrorInRegister
 

Detailed Description

Target specific hooks for defining how a type should be passed or returned from functions with one of the Swift calling conventions.

Definition at line 117 of file ABIInfo.h.

Constructor & Destructor Documentation

◆ SwiftABIInfo()

clang::CodeGen::SwiftABIInfo::SwiftABIInfo ( CodeGen::CodeGenTypes CGT,
bool  SwiftErrorInRegister 
)
inline

Definition at line 123 of file ABIInfo.h.

◆ ~SwiftABIInfo()

SwiftABIInfo::~SwiftABIInfo ( )
virtualdefault

Member Function Documentation

◆ isLegalVectorType()

bool SwiftABIInfo::isLegalVectorType ( CharUnits  VectorSize,
llvm::Type *  EltTy,
unsigned  NumElts 
) const
virtual

Returns true if the given vector type is legal from Swift's calling convention perspective.

Definition at line 160 of file TargetInfo.cpp.

References clang::CharUnits::getQuantity().

Referenced by clang::CodeGen::swiftcall::isLegalVectorType().

◆ isSwiftErrorInRegister()

bool clang::CodeGen::SwiftABIInfo::isSwiftErrorInRegister ( ) const
inline

Returns true if swifterror is lowered to a register by the target ABI.

Definition at line 139 of file ABIInfo.h.

References SwiftErrorInRegister.

Referenced by clang::CodeGen::swiftcall::isSwiftErrorLoweredInRegister().

◆ shouldPassIndirectly()

bool SwiftABIInfo::shouldPassIndirectly ( ArrayRef< llvm::Type * >  ComponentTys,
bool  AsReturnValue 
) const
virtual

Returns true if an aggregate which expands to the given type sequence should be passed / returned indirectly.

Definition at line 155 of file TargetInfo.cpp.

References CGT, and occupiesMoreThan().

Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::shouldPassIndirectly(), and clang::CodeGen::swiftcall::shouldPassIndirectly().

Member Data Documentation

◆ CGT

CodeGenTypes& clang::CodeGen::SwiftABIInfo::CGT
protected

Definition at line 119 of file ABIInfo.h.

Referenced by shouldPassIndirectly().

◆ SwiftErrorInRegister

bool clang::CodeGen::SwiftABIInfo::SwiftErrorInRegister
protected

Definition at line 120 of file ABIInfo.h.

Referenced by isSwiftErrorInRegister().


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