clang API Documentation
#include <CGFunctionInfo.h>
Public Types | |
enum | Kind { Direct, Extend, Indirect, Ignore, Expand, InAlloca, KindFirst = Direct, KindLast = InAlloca } |
Public Member Functions | |
ABIArgInfo () | |
Kind | getKind () const |
bool | isDirect () const |
bool | isInAlloca () const |
bool | isExtend () const |
bool | isIgnore () const |
bool | isIndirect () const |
bool | isExpand () const |
bool | canHaveCoerceToType () const |
unsigned | getDirectOffset () const |
void | setDirectOffset (unsigned Offset) |
llvm::Type * | getPaddingType () const |
void | setPaddingType (llvm::Type *T) |
bool | getPaddingInReg () const |
void | setPaddingInReg (bool PIR) |
llvm::Type * | getCoerceToType () const |
void | setCoerceToType (llvm::Type *T) |
bool | getInReg () const |
void | setInReg (bool IR) |
unsigned | getIndirectAlign () const |
void | setIndirectAlign (unsigned IA) |
bool | getIndirectByVal () const |
void | setIndirectByVal (unsigned IBV) |
bool | getIndirectRealign () const |
void | setIndirectRealign (bool IR) |
bool | isSRetAfterThis () const |
void | setSRetAfterThis (bool AfterThis) |
unsigned | getInAllocaFieldIndex () const |
void | setInAllocaFieldIndex (unsigned FieldIndex) |
bool | getInAllocaSRet () const |
Return true if this field of an inalloca struct should be returned to implement a struct return calling convention. | |
void | setInAllocaSRet (bool SRet) |
bool | getCanBeFlattened () const |
void | setCanBeFlattened (bool Flatten) |
void | dump () const |
Static Public Member Functions | |
static ABIArgInfo | getDirect (llvm::Type *T=nullptr, unsigned Offset=0, llvm::Type *Padding=nullptr, bool CanBeFlattened=true) |
static ABIArgInfo | getDirectInReg (llvm::Type *T=nullptr) |
static ABIArgInfo | getExtend (llvm::Type *T=nullptr) |
static ABIArgInfo | getExtendInReg (llvm::Type *T=nullptr) |
static ABIArgInfo | getIgnore () |
static ABIArgInfo | getIndirect (unsigned Alignment, bool ByVal=true, bool Realign=false, llvm::Type *Padding=nullptr) |
static ABIArgInfo | getIndirectInReg (unsigned Alignment, bool ByVal=true, bool Realign=false) |
static ABIArgInfo | getInAlloca (unsigned FieldIndex) |
static ABIArgInfo | getExpand () |
static ABIArgInfo | getExpandWithPadding (bool PaddingInReg, llvm::Type *Padding) |
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to or returned from a function.
Definition at line 36 of file CGFunctionInfo.h.
Definition at line 38 of file CGFunctionInfo.h.
clang::CodeGen::ABIArgInfo::ABIArgInfo | ( | ) | [inline] |
Definition at line 96 of file CGFunctionInfo.h.
Referenced by getDirect(), getExpand(), getExtend(), getIgnore(), getInAlloca(), and getIndirect().
bool clang::CodeGen::ABIArgInfo::canHaveCoerceToType | ( | ) | const [inline] |
Definition at line 170 of file CGFunctionInfo.h.
References isDirect(), and isExtend().
Referenced by clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(), getCoerceToType(), and setCoerceToType().
void ABIArgInfo::dump | ( | ) | const |
Definition at line 110 of file CodeGen/TargetInfo.cpp.
References Direct, Expand, Extend, getCoerceToType(), getInAllocaFieldIndex(), getIndirectAlign(), getIndirectByVal(), getIndirectRealign(), Ignore, InAlloca, and Indirect.
bool clang::CodeGen::ABIArgInfo::getCanBeFlattened | ( | ) | const [inline] |
Definition at line 271 of file CGFunctionInfo.h.
References isDirect().
Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), and clang::CodeGen::CodeGenTypes::GetFunctionType().
llvm::Type* clang::CodeGen::ABIArgInfo::getCoerceToType | ( | ) | const [inline] |
Definition at line 193 of file CGFunctionInfo.h.
References canHaveCoerceToType().
Referenced by clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(), dump(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), and clang::CodeGen::CodeGenTypes::GetFunctionType().
static ABIArgInfo clang::CodeGen::ABIArgInfo::getDirect | ( | llvm::Type * | T = nullptr , |
unsigned | Offset = 0 , |
||
llvm::Type * | Padding = nullptr , |
||
bool | CanBeFlattened = true |
||
) | [inline, static] |
Definition at line 100 of file CGFunctionInfo.h.
References ABIArgInfo(), and Direct.
Referenced by getDirectInReg().
static ABIArgInfo clang::CodeGen::ABIArgInfo::getDirectInReg | ( | llvm::Type * | T = nullptr | ) | [inline, static] |
Definition at line 110 of file CGFunctionInfo.h.
References getDirect().
unsigned clang::CodeGen::ABIArgInfo::getDirectOffset | ( | ) | const [inline] |
Definition at line 173 of file CGFunctionInfo.h.
References DirectOffset, isDirect(), and isExtend().
Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), and clang::CodeGen::CodeGenFunction::EmitFunctionProlog().
static ABIArgInfo clang::CodeGen::ABIArgInfo::getExpand | ( | ) | [inline, static] |
Definition at line 151 of file CGFunctionInfo.h.
References ABIArgInfo(), and Expand.
Referenced by getExpandWithPadding().
static ABIArgInfo clang::CodeGen::ABIArgInfo::getExpandWithPadding | ( | bool | PaddingInReg, |
llvm::Type * | Padding | ||
) | [inline, static] |
Definition at line 154 of file CGFunctionInfo.h.
References getExpand().
static ABIArgInfo clang::CodeGen::ABIArgInfo::getExtend | ( | llvm::Type * | T = nullptr | ) | [inline, static] |
Definition at line 115 of file CGFunctionInfo.h.
References ABIArgInfo(), and Extend.
Referenced by getExtendInReg().
static ABIArgInfo clang::CodeGen::ABIArgInfo::getExtendInReg | ( | llvm::Type * | T = nullptr | ) | [inline, static] |
Definition at line 121 of file CGFunctionInfo.h.
References getExtend().
static ABIArgInfo clang::CodeGen::ABIArgInfo::getIgnore | ( | ) | [inline, static] |
Definition at line 126 of file CGFunctionInfo.h.
References ABIArgInfo(), and Ignore.
static ABIArgInfo clang::CodeGen::ABIArgInfo::getInAlloca | ( | unsigned | FieldIndex | ) | [inline, static] |
Definition at line 146 of file CGFunctionInfo.h.
References ABIArgInfo(), and InAlloca.
unsigned clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex | ( | ) | const [inline] |
Definition at line 250 of file CGFunctionInfo.h.
References AllocaFieldIndex, and isInAlloca().
Referenced by dump(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), and clang::CodeGen::CodeGenFunction::StartFunction().
bool clang::CodeGen::ABIArgInfo::getInAllocaSRet | ( | ) | const [inline] |
Return true if this field of an inalloca struct should be returned to implement a struct return calling convention.
Definition at line 261 of file CGFunctionInfo.h.
References isInAlloca().
Referenced by clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), and clang::CodeGen::CodeGenTypes::GetFunctionType().
static ABIArgInfo clang::CodeGen::ABIArgInfo::getIndirect | ( | unsigned | Alignment, |
bool | ByVal = true , |
||
bool | Realign = false , |
||
llvm::Type * | Padding = nullptr |
||
) | [inline, static] |
Definition at line 129 of file CGFunctionInfo.h.
References ABIArgInfo(), and Indirect.
Referenced by getIndirectInReg().
unsigned clang::CodeGen::ABIArgInfo::getIndirectAlign | ( | ) | const [inline] |
Definition at line 214 of file CGFunctionInfo.h.
References IndirectAlign, and isIndirect().
Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList(), dump(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), and clang::CodeGen::CodeGenTypes::GetFunctionType().
bool clang::CodeGen::ABIArgInfo::getIndirectByVal | ( | ) | const [inline] |
Definition at line 223 of file CGFunctionInfo.h.
References isIndirect().
Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList(), dump(), clang::CodeGen::CodeGenFunction::EmitCall(), and isArgInAlloca().
static ABIArgInfo clang::CodeGen::ABIArgInfo::getIndirectInReg | ( | unsigned | Alignment, |
bool | ByVal = true , |
||
bool | Realign = false |
||
) | [inline, static] |
Definition at line 140 of file CGFunctionInfo.h.
References getIndirect().
bool clang::CodeGen::ABIArgInfo::getIndirectRealign | ( | ) | const [inline] |
Definition at line 232 of file CGFunctionInfo.h.
References isIndirect().
Referenced by dump(), and clang::CodeGen::CodeGenFunction::EmitFunctionProlog().
bool clang::CodeGen::ABIArgInfo::getInReg | ( | ) | const [inline] |
Definition at line 203 of file CGFunctionInfo.h.
References isDirect(), isExtend(), and isIndirect().
Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList(), and isArgInAlloca().
Kind clang::CodeGen::ABIArgInfo::getKind | ( | ) | const [inline] |
Definition at line 162 of file CGFunctionInfo.h.
Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenFunction::IndirectObjCSetterArg(), isArgInAlloca(), similar(), and clang::CodeGen::CodeGenFunction::StartFunction().
bool clang::CodeGen::ABIArgInfo::getPaddingInReg | ( | ) | const [inline] |
Definition at line 186 of file CGFunctionInfo.h.
Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList().
llvm::Type* clang::CodeGen::ABIArgInfo::getPaddingType | ( | ) | const [inline] |
Definition at line 182 of file CGFunctionInfo.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), and clang::CodeGen::CodeGenTypes::GetFunctionType().
bool clang::CodeGen::ABIArgInfo::isDirect | ( | ) | const [inline] |
Definition at line 163 of file CGFunctionInfo.h.
References Direct.
Referenced by canHaveCoerceToType(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitMustTailThunk(), getCanBeFlattened(), getDirectOffset(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getInReg(), setCanBeFlattened(), setDirectOffset(), and setInReg().
bool clang::CodeGen::ABIArgInfo::isExpand | ( | ) | const [inline] |
Definition at line 168 of file CGFunctionInfo.h.
References Expand.
bool clang::CodeGen::ABIArgInfo::isExtend | ( | ) | const [inline] |
Definition at line 165 of file CGFunctionInfo.h.
References Extend.
Referenced by canHaveCoerceToType(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), getDirectOffset(), getInReg(), setDirectOffset(), and setInReg().
bool clang::CodeGen::ABIArgInfo::isIgnore | ( | ) | const [inline] |
Definition at line 166 of file CGFunctionInfo.h.
References Ignore.
bool clang::CodeGen::ABIArgInfo::isInAlloca | ( | ) | const [inline] |
Definition at line 164 of file CGFunctionInfo.h.
References InAlloca.
Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitMustTailThunk(), getInAllocaFieldIndex(), getInAllocaSRet(), setInAllocaFieldIndex(), and setInAllocaSRet().
bool clang::CodeGen::ABIArgInfo::isIndirect | ( | ) | const [inline] |
Definition at line 167 of file CGFunctionInfo.h.
References Indirect.
Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitMustTailThunk(), getIndirectAlign(), getIndirectByVal(), getIndirectRealign(), getInReg(), isSRetAfterThis(), clang::CodeGen::CodeGenModule::ReturnTypeUsesSRet(), setIndirectAlign(), setIndirectByVal(), setIndirectRealign(), setInReg(), and setSRetAfterThis().
bool clang::CodeGen::ABIArgInfo::isSRetAfterThis | ( | ) | const [inline] |
Definition at line 241 of file CGFunctionInfo.h.
References isIndirect().
Referenced by clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitMustTailThunk(), and clang::CodeGen::CodeGenFunction::StartFunction().
void clang::CodeGen::ABIArgInfo::setCanBeFlattened | ( | bool | Flatten | ) | [inline] |
Definition at line 276 of file CGFunctionInfo.h.
References isDirect().
void clang::CodeGen::ABIArgInfo::setCoerceToType | ( | llvm::Type * | T | ) | [inline] |
Definition at line 198 of file CGFunctionInfo.h.
References canHaveCoerceToType().
Referenced by clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo().
void clang::CodeGen::ABIArgInfo::setDirectOffset | ( | unsigned | Offset | ) | [inline] |
Definition at line 177 of file CGFunctionInfo.h.
References DirectOffset, isDirect(), and isExtend().
void clang::CodeGen::ABIArgInfo::setInAllocaFieldIndex | ( | unsigned | FieldIndex | ) | [inline] |
Definition at line 254 of file CGFunctionInfo.h.
References AllocaFieldIndex, and isInAlloca().
void clang::CodeGen::ABIArgInfo::setInAllocaSRet | ( | bool | SRet | ) | [inline] |
Definition at line 266 of file CGFunctionInfo.h.
References isInAlloca().
void clang::CodeGen::ABIArgInfo::setIndirectAlign | ( | unsigned | IA | ) | [inline] |
Definition at line 218 of file CGFunctionInfo.h.
References IndirectAlign, and isIndirect().
void clang::CodeGen::ABIArgInfo::setIndirectByVal | ( | unsigned | IBV | ) | [inline] |
Definition at line 227 of file CGFunctionInfo.h.
References isIndirect().
void clang::CodeGen::ABIArgInfo::setIndirectRealign | ( | bool | IR | ) | [inline] |
Definition at line 236 of file CGFunctionInfo.h.
References isIndirect().
void clang::CodeGen::ABIArgInfo::setInReg | ( | bool | IR | ) | [inline] |
Definition at line 208 of file CGFunctionInfo.h.
References isDirect(), isExtend(), and isIndirect().
void clang::CodeGen::ABIArgInfo::setPaddingInReg | ( | bool | PIR | ) | [inline] |
Definition at line 189 of file CGFunctionInfo.h.
void clang::CodeGen::ABIArgInfo::setPaddingType | ( | llvm::Type * | T | ) | [inline] |
Definition at line 184 of file CGFunctionInfo.h.
void clang::CodeGen::ABIArgInfo::setSRetAfterThis | ( | bool | AfterThis | ) | [inline] |
Definition at line 245 of file CGFunctionInfo.h.
References isIndirect().
Definition at line 81 of file CGFunctionInfo.h.
Referenced by getInAllocaFieldIndex(), and setInAllocaFieldIndex().
Definition at line 79 of file CGFunctionInfo.h.
Referenced by getDirectOffset(), and setDirectOffset().
Definition at line 80 of file CGFunctionInfo.h.
Referenced by getIndirectAlign(), and setIndirectAlign().