clang  6.0.0svn
Public Member Functions | Public Attributes | Protected Attributes | List of all members
clang::CodeGen::ABIInfo Class Referenceabstract

ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions. More...

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/CodeGen/ABIInfo.h"

Inheritance diagram for clang::CodeGen::ABIInfo:
Inheritance graph
[legend]
Collaboration diagram for clang::CodeGen::ABIInfo:
Collaboration graph
[legend]

Public Member Functions

 ABIInfo (CodeGen::CodeGenTypes &cgt)
 
virtual ~ABIInfo ()
 
virtual bool supportsSwift () const
 
CodeGen::CGCXXABIgetCXXABI () const
 
ASTContextgetContext () const
 
llvm::LLVMContext & getVMContext () const
 
const llvm::DataLayout & getDataLayout () const
 
const TargetInfogetTarget () const
 
const CodeGenOptionsgetCodeGenOpts () const
 
llvm::CallingConv::ID getRuntimeCC () const
 Return the calling convention to use for system runtime functions. More...
 
llvm::CallingConv::ID getBuiltinCC () const
 Return the calling convention to use for compiler builtins. More...
 
virtual void computeInfo (CodeGen::CGFunctionInfo &FI) const =0
 
virtual CodeGen::Address EmitVAArg (CodeGen::CodeGenFunction &CGF, CodeGen::Address VAListAddr, QualType Ty) const =0
 EmitVAArg - Emit the target dependent code to load a value of. More...
 
bool isAndroid () const
 
virtual CodeGen::Address EmitMSVAArg (CodeGen::CodeGenFunction &CGF, CodeGen::Address VAListAddr, QualType Ty) const
 Emit the target dependent code to load a value of. More...
 
virtual bool isHomogeneousAggregateBaseType (QualType Ty) const
 
virtual bool isHomogeneousAggregateSmallEnough (const Type *Base, uint64_t Members) const
 
virtual bool shouldSignExtUnsignedType (QualType Ty) const
 
bool isHomogeneousAggregate (QualType Ty, const Type *&Base, uint64_t &Members) const
 isHomogeneousAggregate - Return true if a type is an ELFv2 homogeneous aggregate. More...
 
CodeGen::ABIArgInfo getNaturalAlignIndirect (QualType Ty, bool ByRef=true, bool Realign=false, llvm::Type *Padding=nullptr) const
 A convenience method to return an indirect ABIArgInfo with an expected alignment equal to the ABI alignment of the given type. More...
 
CodeGen::ABIArgInfo getNaturalAlignIndirectInReg (QualType Ty, bool Realign=false) const
 

Public Attributes

CodeGen::CodeGenTypesCGT
 

Protected Attributes

llvm::CallingConv::ID RuntimeCC
 
llvm::CallingConv::ID BuiltinCC
 

Detailed Description

ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions.

Definition at line 51 of file ABIInfo.h.

Constructor & Destructor Documentation

◆ ABIInfo()

clang::CodeGen::ABIInfo::ABIInfo ( CodeGen::CodeGenTypes cgt)
inline

Definition at line 58 of file ABIInfo.h.

◆ ~ABIInfo()

ABIInfo::~ABIInfo ( )
virtual

Definition at line 98 of file TargetInfo.cpp.

Member Function Documentation

◆ computeInfo()

virtual void clang::CodeGen::ABIInfo::computeInfo ( CodeGen::CGFunctionInfo FI) const
pure virtual

◆ EmitMSVAArg()

Address ABIInfo::EmitMSVAArg ( CodeGen::CodeGenFunction CGF,
CodeGen::Address  VAListAddr,
QualType  Ty 
) const
virtual

Emit the target dependent code to load a value of.

  • Ty from the __builtin_ms_va_list pointed to by
  • VAListAddr.

Definition at line 93 of file TargetInfo.cpp.

References clang::CodeGen::Address::invalid().

◆ EmitVAArg()

virtual CodeGen::Address clang::CodeGen::ABIInfo::EmitVAArg ( CodeGen::CodeGenFunction CGF,
CodeGen::Address  VAListAddr,
QualType  Ty 
) const
pure virtual

EmitVAArg - Emit the target dependent code to load a value of.

  • Ty from the va_list pointed to by
  • VAListAddr.

◆ getBuiltinCC()

llvm::CallingConv::ID clang::CodeGen::ABIInfo::getBuiltinCC ( ) const
inline

Return the calling convention to use for compiler builtins.

Definition at line 81 of file ABIInfo.h.

◆ getCodeGenOpts()

const CodeGenOptions & ABIInfo::getCodeGenOpts ( ) const

Definition at line 189 of file TargetInfo.cpp.

References CGT, and clang::CodeGen::CodeGenTypes::getCodeGenOpts().

◆ getContext()

ASTContext & ABIInfo::getContext ( ) const

◆ getCXXABI()

CGCXXABI & ABIInfo::getCXXABI ( ) const

◆ getDataLayout()

const llvm::DataLayout & ABIInfo::getDataLayout ( ) const

◆ getNaturalAlignIndirect()

ABIArgInfo ABIInfo::getNaturalAlignIndirect ( QualType  Ty,
bool  ByRef = true,
bool  Realign = false,
llvm::Type Padding = nullptr 
) const

A convenience method to return an indirect ABIArgInfo with an expected alignment equal to the ABI alignment of the given type.

Definition at line 81 of file TargetInfo.cpp.

References getContext(), and clang::CodeGen::ABIArgInfo::getIndirect().

Referenced by addBaseAndFieldSizes(), and EmitX86_64VAArgFromMemory().

◆ getNaturalAlignIndirectInReg()

ABIArgInfo ABIInfo::getNaturalAlignIndirectInReg ( QualType  Ty,
bool  Realign = false 
) const

Definition at line 88 of file TargetInfo.cpp.

References getContext(), and clang::CodeGen::ABIArgInfo::getIndirectInReg().

Referenced by addBaseAndFieldSizes().

◆ getRuntimeCC()

llvm::CallingConv::ID clang::CodeGen::ABIInfo::getRuntimeCC ( ) const
inline

Return the calling convention to use for system runtime functions.

Definition at line 76 of file ABIInfo.h.

◆ getTarget()

const TargetInfo & ABIInfo::getTarget ( ) const

◆ getVMContext()

llvm::LLVMContext & ABIInfo::getVMContext ( ) const

◆ isAndroid()

bool ABIInfo::isAndroid ( ) const

Definition at line 193 of file TargetInfo.cpp.

References getTarget(), and clang::TargetInfo::getTriple().

◆ isHomogeneousAggregate()

bool ABIInfo::isHomogeneousAggregate ( QualType  Ty,
const Type *&  Base,
uint64_t &  Members 
) const

isHomogeneousAggregate - Return true if a type is an ELFv2 homogeneous aggregate.

Base is set to the base element type, and Members is set to the number of base elements.

Definition at line 4501 of file TargetInfo.cpp.

References clang::CodeGen::Base, clang::Type::getAs(), getContext(), and clang::RecordDecl::hasFlexibleArrayMember().

Referenced by addBaseAndFieldSizes(), and EmitX86_64VAArgFromMemory().

◆ isHomogeneousAggregateBaseType()

bool ABIInfo::isHomogeneousAggregateBaseType ( QualType  Ty) const
virtual

Definition at line 195 of file TargetInfo.cpp.

◆ isHomogeneousAggregateSmallEnough()

bool ABIInfo::isHomogeneousAggregateSmallEnough ( const Type Base,
uint64_t  Members 
) const
virtual

Definition at line 199 of file TargetInfo.cpp.

◆ shouldSignExtUnsignedType()

bool ABIInfo::shouldSignExtUnsignedType ( QualType  Ty) const
virtual

Definition at line 204 of file TargetInfo.cpp.

◆ supportsSwift()

virtual bool clang::CodeGen::ABIInfo::supportsSwift ( ) const
inlinevirtual

Reimplemented in clang::CodeGen::SwiftABIInfo.

Definition at line 65 of file ABIInfo.h.

Referenced by clang::CodeGen::SwiftABIInfo::classof().

Member Data Documentation

◆ BuiltinCC

llvm::CallingConv::ID clang::CodeGen::ABIInfo::BuiltinCC
protected

Definition at line 56 of file ABIInfo.h.

◆ CGT

CodeGen::CodeGenTypes& clang::CodeGen::ABIInfo::CGT

◆ RuntimeCC

llvm::CallingConv::ID clang::CodeGen::ABIInfo::RuntimeCC
protected

Definition at line 55 of file ABIInfo.h.


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