clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions
clang::ABIArgInfo Class Reference

#include <ABIInfo.h>

List of all members.

Public Types

enum  Kind {
  Direct, Extend, Indirect, Ignore,
  Expand, KindFirst = Direct, KindLast = Expand
}

Public Member Functions

 ABIArgInfo ()
Kind getKind () const
bool isDirect () const
bool isExtend () const
bool isIgnore () const
bool isIndirect () const
bool isExpand () const
bool canHaveCoerceToType () const
unsigned getDirectOffset () const
llvm::Type * getPaddingType () const
llvm::Type * getCoerceToType () const
void setCoerceToType (llvm::Type *T)
unsigned getIndirectAlign () const
bool getIndirectByVal () const
bool getIndirectRealign () const
void dump () const

Static Public Member Functions

static ABIArgInfo getDirect (llvm::Type *T=0, unsigned Offset=0, llvm::Type *Padding=0)
static ABIArgInfo getExtend (llvm::Type *T=0)
static ABIArgInfo getIgnore ()
static ABIArgInfo getIndirect (unsigned Alignment, bool ByVal=true, bool Realign=false)
static ABIArgInfo getExpand ()

Detailed Description

ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to or returned from a function.

Definition at line 38 of file ABIInfo.h.


Member Enumeration Documentation

Enumerator:
Direct 

Direct - Pass the argument directly using the normal converted LLVM type, or by coercing to another specified type stored in 'CoerceToType'). If an offset is specified (in UIntData), then the argument passed is offset by some number of bytes in the memory representation. A dummy argument is emitted before the real argument if the specified type stored in "PaddingType" is not zero.

Extend 

Extend - Valid only for integer argument types. Same as 'direct' but also emit a zero/sign extension attribute.

Indirect 

Indirect - Pass the argument indirectly via a hidden pointer with the specified alignment (0 indicates default alignment).

Ignore 

Ignore - Ignore the argument (treat as void). Useful for void and empty structs.

Expand 

Expand - Only valid for aggregate argument types. The structure should be expanded into consecutive arguments for its constituent fields. Currently expand is only allowed on structures whose fields are all scalar types or are themselves expandable types.

KindFirst 
KindLast 

Definition at line 40 of file ABIInfo.h.


Constructor & Destructor Documentation

clang::ABIArgInfo::ABIArgInfo ( ) [inline]

Definition at line 84 of file ABIInfo.h.

Referenced by getDirect(), getExpand(), getExtend(), getIgnore(), and getIndirect().


Member Function Documentation

bool clang::ABIArgInfo::canHaveCoerceToType ( ) const [inline]

Definition at line 111 of file ABIInfo.h.

References Direct, and Extend.

Referenced by clang::CodeGen::CodeGenTypes::arrangeFunctionType(), getCoerceToType(), and setCoerceToType().

void ABIArgInfo::dump ( ) const

Definition at line 59 of file CodeGen/TargetInfo.cpp.

llvm::Type* clang::ABIArgInfo::getCoerceToType ( ) const [inline]
static ABIArgInfo clang::ABIArgInfo::getDirect ( llvm::Type *  T = 0,
unsigned  Offset = 0,
llvm::Type *  Padding = 0 
) [inline, static]

Definition at line 86 of file ABIInfo.h.

References ABIArgInfo(), and Direct.

unsigned clang::ABIArgInfo::getDirectOffset ( ) const [inline]
static ABIArgInfo clang::ABIArgInfo::getExpand ( ) [inline, static]

Definition at line 100 of file ABIInfo.h.

References ABIArgInfo(), and Expand.

static ABIArgInfo clang::ABIArgInfo::getExtend ( llvm::Type *  T = 0) [inline, static]

Definition at line 90 of file ABIInfo.h.

References ABIArgInfo(), and Extend.

static ABIArgInfo clang::ABIArgInfo::getIgnore ( ) [inline, static]

Definition at line 93 of file ABIInfo.h.

References ABIArgInfo(), and Ignore.

static ABIArgInfo clang::ABIArgInfo::getIndirect ( unsigned  Alignment,
bool  ByVal = true,
bool  Realign = false 
) [inline, static]

Definition at line 96 of file ABIInfo.h.

References ABIArgInfo(), and Indirect.

unsigned clang::ABIArgInfo::getIndirectAlign ( ) const [inline]
bool clang::ABIArgInfo::getIndirectByVal ( ) const [inline]
bool clang::ABIArgInfo::getIndirectRealign ( ) const [inline]

Definition at line 146 of file ABIInfo.h.

References Indirect.

Referenced by clang::CodeGen::CodeGenFunction::EmitFunctionProlog().

Kind clang::ABIArgInfo::getKind ( ) const [inline]
llvm::Type* clang::ABIArgInfo::getPaddingType ( ) const [inline]
bool clang::ABIArgInfo::isDirect ( ) const [inline]

Definition at line 105 of file ABIInfo.h.

References Direct.

Referenced by getDirectOffset().

bool clang::ABIArgInfo::isExpand ( ) const [inline]

Definition at line 109 of file ABIInfo.h.

References Expand.

bool clang::ABIArgInfo::isExtend ( ) const [inline]

Definition at line 106 of file ABIInfo.h.

References Extend.

Referenced by getDirectOffset().

bool clang::ABIArgInfo::isIgnore ( ) const [inline]

Definition at line 107 of file ABIInfo.h.

References Ignore.

bool clang::ABIArgInfo::isIndirect ( ) const [inline]

Definition at line 108 of file ABIInfo.h.

References Indirect.

Referenced by clang::CodeGen::CodeGenModule::ReturnTypeUsesSRet().

void clang::ABIArgInfo::setCoerceToType ( llvm::Type *  T) [inline]

Definition at line 130 of file ABIInfo.h.

References canHaveCoerceToType().

Referenced by clang::CodeGen::CodeGenTypes::arrangeFunctionType().


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