clang  3.9.0
Functions
SwiftCallingConv.cpp File Reference
#include "clang/CodeGen/SwiftCallingConv.h"
#include "clang/Basic/TargetInfo.h"
#include "CodeGenModule.h"
#include "TargetInfo.h"
Include dependency graph for SwiftCallingConv.cpp:

Go to the source code of this file.

Functions

static const SwiftABIInfogetSwiftABIInfo (CodeGenModule &CGM)
 
static bool isPowerOf2 (unsigned n)
 
static llvm::Type * getCommonType (llvm::Type *first, llvm::Type *second)
 Given two types with the same size, try to find a common type. More...
 
static CharUnits getTypeStoreSize (CodeGenModule &CGM, llvm::Type *type)
 
static CharUnits getOffsetAtStartOfUnit (CharUnits offset, CharUnits unitSize)
 Given a power-of-two unit size, return the offset of the aligned unit of that size which contains the given offset. More...
 
static bool areBytesInSameUnit (CharUnits first, CharUnits second, CharUnits chunkSize)
 
static ABIArgInfo classifyExpandedType (SwiftAggLowering &lowering, bool forReturn, CharUnits alignmentForIndirect)
 
static ABIArgInfo classifyType (CodeGenModule &CGM, CanQualType type, bool forReturn)
 

Function Documentation

static bool areBytesInSameUnit ( CharUnits  first,
CharUnits  second,
CharUnits  chunkSize 
)
static
static ABIArgInfo classifyExpandedType ( SwiftAggLowering lowering,
bool  forReturn,
CharUnits  alignmentForIndirect 
)
static
static ABIArgInfo classifyType ( CodeGenModule CGM,
CanQualType  type,
bool  forReturn 
)
static
static llvm::Type* getCommonType ( llvm::Type *  first,
llvm::Type *  second 
)
static

Given two types with the same size, try to find a common type.

Definition at line 32 of file SwiftCallingConv.cpp.

static CharUnits getOffsetAtStartOfUnit ( CharUnits  offset,
CharUnits  unitSize 
)
static

Given a power-of-two unit size, return the offset of the aligned unit of that size which contains the given offset.

In other words, round down to the nearest multiple of the unit size.

Definition at line 402 of file SwiftCallingConv.cpp.

References clang::CharUnits::fromQuantity(), clang::CharUnits::getQuantity(), and isPowerOf2().

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

static const SwiftABIInfo& getSwiftABIInfo ( CodeGenModule CGM)
static
static CharUnits getTypeStoreSize ( CodeGenModule CGM,
llvm::Type *  type 
)
static
static bool isPowerOf2 ( unsigned  n)
static