clang API Documentation
#include "CGCall.h"
#include "ABIInfo.h"
#include "CGCXXABI.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "TargetInfo.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CodeGen/CGFunctionInfo.h"
#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/Transforms/Utils/Local.h"
Go to the source code of this file.
Functions | |
static unsigned | ClangCallConvToLLVMCallConv (CallingConv CC) |
static CanQualType | GetThisType (ASTContext &Context, const CXXRecordDecl *RD) |
static CanQual< FunctionProtoType > | GetFormalType (const CXXMethodDecl *MD) |
Returns the canonical formal type of the given C++ method. | |
static CanQualType | GetReturnType (QualType RetTy) |
static const CGFunctionInfo & | arrangeLLVMFunctionInfo (CodeGenTypes &CGT, bool IsInstanceMethod, SmallVectorImpl< CanQualType > &prefix, CanQual< FunctionProtoType > FTP) |
static CallingConv | getCallingConventionForDecl (const Decl *D, bool IsWindows) |
static const CGFunctionInfo & | arrangeFreeFunctionLikeCall (CodeGenTypes &CGT, CodeGenModule &CGM, const CallArgList &args, const FunctionType *fnType, unsigned numExtraRequiredArgs) |
static std::unique_ptr < TypeExpansion > | getTypeExpansion (QualType Ty, const ASTContext &Context) |
static int | getExpansionSize (QualType Ty, const ASTContext &Context) |
static llvm::Value * | EnterStructPointerForCoercedAccess (llvm::Value *SrcPtr, llvm::StructType *SrcSTy, uint64_t DstSize, CodeGenFunction &CGF) |
static llvm::Value * | CoerceIntOrPtrToIntOrPtr (llvm::Value *Val, llvm::Type *Ty, CodeGenFunction &CGF) |
static llvm::Value * | CreateCoercedLoad (llvm::Value *SrcPtr, llvm::Type *Ty, CodeGenFunction &CGF) |
static void | BuildAggStore (CodeGenFunction &CGF, llvm::Value *Val, llvm::Value *DestPtr, bool DestIsVolatile, bool LowAlignment) |
static void | CreateCoercedStore (llvm::Value *Src, llvm::Value *DstPtr, bool DstIsVolatile, CodeGenFunction &CGF) |
static llvm::Value * | emitArgumentDemotion (CodeGenFunction &CGF, const VarDecl *var, llvm::Value *value) |
static const NonNullAttr * | getNonNullAttr (const Decl *FD, const ParmVarDecl *PVD, QualType ArgType, unsigned ArgNo) |
static void | eraseUnusedBitCasts (llvm::Instruction *insn) |
static llvm::Value * | tryEmitFusedAutoreleaseOfResult (CodeGenFunction &CGF, llvm::Value *result) |
Try to emit a fused autorelease of a return result. | |
static llvm::Value * | tryRemoveRetainOfSelf (CodeGenFunction &CGF, llvm::Value *result) |
If this is a +1 of the value of an immutable 'self', remove it. | |
static llvm::Value * | emitAutoreleaseOfResult (CodeGenFunction &CGF, llvm::Value *result) |
static llvm::StoreInst * | findDominatingStoreToReturnValue (CodeGenFunction &CGF) |
Heuristically search for a dominating store to the return-value slot. | |
static bool | isInAllocaArgument (CGCXXABI &ABI, QualType type) |
static AggValueSlot | createPlaceholderSlot (CodeGenFunction &CGF, QualType Ty) |
static bool | isProvablyNull (llvm::Value *addr) |
static bool | isProvablyNonNull (llvm::Value *addr) |
static void | emitWriteback (CodeGenFunction &CGF, const CallArgList::Writeback &writeback) |
Emit the actual writing-back of a writeback. | |
static void | emitWritebacks (CodeGenFunction &CGF, const CallArgList &args) |
static void | deactivateArgCleanupsBeforeCall (CodeGenFunction &CGF, const CallArgList &CallArgs) |
static const Expr * | maybeGetUnaryAddrOfOperand (const Expr *E) |
static void | emitWritebackArg (CodeGenFunction &CGF, CallArgList &args, const ObjCIndirectCopyRestoreExpr *CRE) |
static void | emitNonNullArgCheck (CodeGenFunction &CGF, RValue RV, QualType ArgType, SourceLocation ArgLoc, const FunctionDecl *FD, unsigned ParmNum) |
static void | EmitInitStoreOfNonAggregate (CodeGenFunction &CGF, RValue Src, LValue Dst) |
Store a non-aggregate value to an address to initialize it. For initialization, a non-atomic store will be used. |
static const CGFunctionInfo& arrangeFreeFunctionLikeCall | ( | CodeGenTypes & | CGT, |
CodeGenModule & | CGM, | ||
const CallArgList & | args, | ||
const FunctionType * | fnType, | ||
unsigned | numExtraRequiredArgs | ||
) | [static] |
Arrange a call as unto a free function, except possibly with an additional number of formal parameters considered required.
Definition at line 345 of file CGCall.cpp.
References clang::CodeGen::RequiredArgs::All, clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall(), clang::FunctionType::getExtInfo(), clang::FunctionType::getReturnType(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), and clang::TargetCodeGenInfo::isNoProtoCallVariadic().
Referenced by clang::CodeGen::CodeGenTypes::arrangeBlockFunctionCall(), and clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall().
static const CGFunctionInfo& arrangeLLVMFunctionInfo | ( | CodeGenTypes & | CGT, |
bool | IsInstanceMethod, | ||
SmallVectorImpl< CanQualType > & | prefix, | ||
CanQual< FunctionProtoType > | FTP | ||
) | [static] |
Arrange the LLVM function layout for a value of the given function type, on top of any implicit parameters already stored.
Definition at line 93 of file CGCall.cpp.
References clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(), clang::CodeGen::RequiredArgs::forPrototypePlus(), and clang::CanQual< T >::getUnqualifiedType().
static void BuildAggStore | ( | CodeGenFunction & | CGF, |
llvm::Value * | Val, | ||
llvm::Value * | DestPtr, | ||
bool | DestIsVolatile, | ||
bool | LowAlignment | ||
) | [static] |
Definition at line 935 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder.
Referenced by CreateCoercedStore(), and clang::CodeGen::CodeGenFunction::EmitCall().
static unsigned ClangCallConvToLLVMCallConv | ( | CallingConv | CC | ) | [static] |
Definition at line 39 of file CGCall.cpp.
References AttributeLangSupport::C, clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::CC_IntelOclBicc, clang::CC_X86_64SysV, clang::CC_X86_64Win64, clang::CC_X86FastCall, clang::CC_X86Pascal, clang::CC_X86StdCall, clang::CC_X86ThisCall, and clang::CC_X86VectorCall.
Referenced by clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo().
static llvm::Value* CoerceIntOrPtrToIntOrPtr | ( | llvm::Value * | Val, |
llvm::Type * | Ty, | ||
CodeGenFunction & | CGF | ||
) | [static] |
CoerceIntOrPtrToIntOrPtr - Convert a value Val to the specific Ty where both are either integers or pointers. This does a truncation of the value if it is too large or a zero extension if it is too small.
This behaves as if the value were coerced through memory, so on big-endian targets the high bits are preserved in a truncation, while little-endian targets preserve the low bits.
Definition at line 822 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getDataLayout(), and clang::CodeGen::CodeGenTypeCache::IntPtrTy.
Referenced by CreateCoercedLoad(), and CreateCoercedStore().
static llvm::Value* CreateCoercedLoad | ( | llvm::Value * | SrcPtr, |
llvm::Type * | Ty, | ||
CodeGenFunction & | CGF | ||
) | [static] |
CreateCoercedLoad - Create a load from
This safely handles the case when the src type is smaller than the destination type; in this situation the values of bits which not present in the src are undefined.
Definition at line 875 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, CoerceIntOrPtrToIntOrPtr(), clang::CodeGen::CodeGenFunction::CreateTempAlloca(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenModule::getDataLayout(), getElementType(), and clang::CodeGen::CodeGenTypeCache::IntPtrTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), and clang::CodeGen::CodeGenFunction::EmitFunctionEpilog().
static void CreateCoercedStore | ( | llvm::Value * | Src, |
llvm::Value * | DstPtr, | ||
bool | DstIsVolatile, | ||
CodeGenFunction & | CGF | ||
) | [static] |
CreateCoercedStore - Create a store to
This safely handles the case when the src type is larger than the destination type; the upper bits of the src will be lost.
Definition at line 961 of file CGCall.cpp.
References BuildAggStore(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, CoerceIntOrPtrToIntOrPtr(), clang::CodeGen::CodeGenFunction::CreateTempAlloca(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenModule::getDataLayout(), getElementType(), and clang::CodeGen::CodeGenTypeCache::IntPtrTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), and clang::CodeGen::CodeGenFunction::EmitFunctionProlog().
static AggValueSlot createPlaceholderSlot | ( | CodeGenFunction & | CGF, |
QualType | Ty | ||
) | [static] |
Definition at line 2321 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::forAddr(), clang::QualType::getQualifiers(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotDestructed, and clang::CharUnits::Zero().
Referenced by clang::CodeGen::CodeGenFunction::EmitCallArg().
static void deactivateArgCleanupsBeforeCall | ( | CodeGenFunction & | CGF, |
const CallArgList & | CallArgs | ||
) | [static] |
Definition at line 2444 of file CGCall.cpp.
References clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), clang::CodeGen::CodeGenFunction::DeactivateCleanupBlock(), clang::CodeGen::CallArgList::getCleanupsToDeactivate(), clang::TargetInfo::getCXXABI(), and clang::CodeGen::CodeGenFunction::getTarget().
Referenced by clang::CodeGen::CodeGenFunction::EmitCall().
static llvm::Value* emitArgumentDemotion | ( | CodeGenFunction & | CGF, |
const VarDecl * | var, | ||
llvm::Value * | value | ||
) | [static] |
An argument came in as a promoted argument; demote it back to its declared type.
Definition at line 1579 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertType(), and clang::ValueDecl::getType().
Referenced by clang::CodeGen::CodeGenFunction::EmitFunctionProlog().
static llvm::Value* emitAutoreleaseOfResult | ( | CodeGenFunction & | CGF, |
llvm::Value * | result | ||
) | [static] |
Emit an ARC autorelease of the result of a function.
Definition at line 2117 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::EmitARCAutoreleaseReturnValue(), clang::CodeGen::CodeGenFunction::shouldUseFusedARCCalls(), tryEmitFusedAutoreleaseOfResult(), and tryRemoveRetainOfSelf().
Referenced by clang::CodeGen::CodeGenFunction::EmitFunctionEpilog().
static void EmitInitStoreOfNonAggregate | ( | CodeGenFunction & | CGF, |
RValue | Src, | ||
LValue | Dst | ||
) | [static] |
Store a non-aggregate value to an address to initialize it. For initialization, a non-atomic store will be used.
Definition at line 2924 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::EmitStoreOfComplex(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::RValue::getComplexVal(), clang::CodeGen::RValue::getScalarVal(), and clang::CodeGen::RValue::isScalar().
Referenced by clang::CodeGen::CodeGenFunction::EmitCall().
static void emitNonNullArgCheck | ( | CodeGenFunction & | CGF, |
RValue | RV, | ||
QualType | ArgType, | ||
SourceLocation | ArgLoc, | ||
const FunctionDecl * | FD, | ||
unsigned | ParmNum | ||
) | [static] |
Definition at line 2619 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitCheck(), clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation(), getNonNullAttr(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::CodeGen::RValue::getScalarVal(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::RValue::isScalar(), and clang::CodeGen::CodeGenFunction::SanOpts.
Referenced by clang::CodeGen::CodeGenFunction::EmitCallArgs().
static void emitWriteback | ( | CodeGenFunction & | CGF, |
const CallArgList::Writeback & | writeback | ||
) | [static] |
Emit the actual writing-back of a writeback.
Definition at line 2373 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::EmitARCIntrinsicUse(), clang::CodeGen::CodeGenFunction::EmitARCRelease(), clang::CodeGen::CodeGenFunction::EmitARCRetainNonBlock(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), getElementType(), clang::CodeGen::LValue::getObjCLifetime(), clang::CodeGen::LValue::isARCPreciseLifetime(), isProvablyNonNull(), isProvablyNull(), clang::Qualifiers::OCL_Strong, clang::CodeGen::CallArgList::Writeback::Source, clang::CodeGen::CallArgList::Writeback::Temporary, and clang::CodeGen::CallArgList::Writeback::ToUse.
Referenced by emitWritebacks().
static void emitWritebackArg | ( | CodeGenFunction & | CGF, |
CallArgList & | args, | ||
const ObjCIndirectCopyRestoreExpr * | CRE | ||
) | [static] |
Emit an argument that's being passed call-by-writeback. That is, we are passing the address of
Definition at line 2466 of file CGCall.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CallArgList::addWriteback(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), clang::CodeGen::CodeGenFunction::Builder, clang::Type::castAs(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::CreateTempAlloca(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::LValue::getObjCLifetime(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCIndirectCopyRestoreExpr::getSubExpr(), clang::Expr::getType(), isProvablyNonNull(), isProvablyNull(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), maybeGetUnaryAddrOfOperand(), clang::Qualifiers::OCL_Strong, and clang::ObjCIndirectCopyRestoreExpr::shouldCopy().
Referenced by clang::CodeGen::CodeGenFunction::EmitCallArg().
static void emitWritebacks | ( | CodeGenFunction & | CGF, |
const CallArgList & | args | ||
) | [static] |
Definition at line 2438 of file CGCall.cpp.
References emitWriteback(), and clang::CodeGen::CallArgList::writebacks().
Referenced by clang::CodeGen::CodeGenFunction::EmitCall().
static llvm::Value* EnterStructPointerForCoercedAccess | ( | llvm::Value * | SrcPtr, |
llvm::StructType * | SrcSTy, | ||
uint64_t | DstSize, | ||
CodeGenFunction & | CGF | ||
) | [static] |
EnterStructPointerForCoercedAccess - Given a struct pointer that we are accessing some number of bytes out of it, try to gep into the struct to get at its inner goodness. Dive as deep as possible without entering an element with an in-memory size smaller than DstSize.
Definition at line 785 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getDataLayout(), and getElementType().
Referenced by CreateCoercedLoad(), and CreateCoercedStore().
static void eraseUnusedBitCasts | ( | llvm::Instruction * | insn | ) | [static] |
Definition at line 1977 of file CGCall.cpp.
Referenced by tryRemoveRetainOfSelf().
static llvm::StoreInst* findDominatingStoreToReturnValue | ( | CodeGenFunction & | CGF | ) | [static] |
Heuristically search for a dominating store to the return-value slot.
Definition at line 2135 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, and clang::CodeGen::CodeGenFunction::ReturnValue.
Referenced by clang::CodeGen::CodeGenFunction::EmitFunctionEpilog().
static CallingConv getCallingConventionForDecl | ( | const Decl * | D, |
bool | IsWindows | ||
) | [static] |
Definition at line 113 of file CGCall.cpp.
References clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::CC_C, clang::CC_IntelOclBicc, clang::CC_PnaclCall, clang::CC_X86_64SysV, clang::CC_X86_64Win64, clang::CC_X86FastCall, clang::CC_X86Pascal, clang::CC_X86StdCall, clang::CC_X86ThisCall, clang::CC_X86VectorCall, clang::Decl::getAttr(), and clang::Decl::hasAttr().
Referenced by clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature().
static int getExpansionSize | ( | QualType | Ty, |
const ASTContext & | Context | ||
) | [static] |
Definition at line 645 of file CGCall.cpp.
References getTypeExpansion().
static CanQual<FunctionProtoType> GetFormalType | ( | const CXXMethodDecl * | MD | ) | [static] |
Returns the canonical formal type of the given C++ method.
Definition at line 66 of file CGCall.cpp.
References clang::CanQual< T >::getAs(), clang::Type::getCanonicalTypeUnqualified(), and clang::ValueDecl::getType().
Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), and clang::CodeGen::CodeGenTypes::arrangeMSMemberPointerThunk().
static const NonNullAttr* getNonNullAttr | ( | const Decl * | FD, |
const ParmVarDecl * | PVD, | ||
QualType | ArgType, | ||
unsigned | ArgNo | ||
) | [static] |
Returns the attribute (either parameter attribute, or function attribute), which declares argument ArgNo to be non-null.
Definition at line 1599 of file CGCall.cpp.
References clang::Decl::getAttr(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), and clang::Decl::specific_attrs().
Referenced by clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), and emitNonNullArgCheck().
static CanQualType GetReturnType | ( | QualType | RetTy | ) | [static] |
Returns the "extra-canonicalized" return type, which discards qualifiers on the return type. Codegen doesn't care about them, and it makes ABI code a little easier to be able to assume that all parameter and return types are top-level unqualified.
Definition at line 75 of file CGCall.cpp.
References clang::Type::getCanonicalTypeUnqualified(), and clang::CanQual< T >::getUnqualifiedType().
Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall(), clang::CodeGen::CodeGenTypes::arrangeFreeFunctionDeclaration(), and clang::CodeGen::CodeGenTypes::arrangeObjCMessageSendSignature().
static CanQualType GetThisType | ( | ASTContext & | Context, |
const CXXRecordDecl * | RD | ||
) | [static] |
Derives the 'this' type for codegen purposes, i.e. ignoring method qualification. FIXME: address space qualification?
Definition at line 60 of file CGCall.cpp.
References clang::CanQual< Type >::CreateUnsafe(), clang::Type::getCanonicalTypeInternal(), clang::ASTContext::getPointerType(), and clang::ASTContext::getTagDeclType().
Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), and clang::CodeGen::CodeGenTypes::arrangeMSMemberPointerThunk().
static std::unique_ptr<TypeExpansion> getTypeExpansion | ( | QualType | Ty, |
const ASTContext & | Context | ||
) | [static] |
Definition at line 588 of file CGCall.cpp.
References clang::Type::getAs(), clang::ASTContext::getAsConstantArrayType(), clang::ASTContext::getTypeSizeInChars(), clang::RecordDecl::hasFlexibleArrayMember(), clang::TagDecl::isUnion(), and clang::CharUnits::Zero().
Referenced by clang::CodeGen::CodeGenTypes::getExpandedTypes(), and getExpansionSize().
static bool isInAllocaArgument | ( | CGCXXABI & | ABI, |
QualType | type | ||
) | [static] |
Definition at line 2316 of file CGCall.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CGCXXABI::getRecordArgABI(), and clang::CodeGen::CGCXXABI::RAA_DirectInMemory.
Referenced by clang::CodeGen::CodeGenFunction::EmitCallArgs(), and clang::CodeGen::CodeGenFunction::EmitDelegateCallArg().
static bool isProvablyNonNull | ( | llvm::Value * | addr | ) | [static] |
Definition at line 2368 of file CGCall.cpp.
Referenced by emitWriteback(), and emitWritebackArg().
static bool isProvablyNull | ( | llvm::Value * | addr | ) | [static] |
Definition at line 2364 of file CGCall.cpp.
Referenced by emitWriteback(), and emitWritebackArg().
static const Expr* maybeGetUnaryAddrOfOperand | ( | const Expr * | E | ) | [static] |
Definition at line 2457 of file CGCall.cpp.
References clang::Expr::IgnoreParens(), and clang::UO_AddrOf.
Referenced by emitWritebackArg().
static llvm::Value* tryEmitFusedAutoreleaseOfResult | ( | CodeGenFunction & | CGF, |
llvm::Value * | result | ||
) | [static] |
Try to emit a fused autorelease of a return result.
Definition at line 1989 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleaseReturnValue(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), clang::CodeGen::ARCEntrypoints::objc_retain, clang::CodeGen::ARCEntrypoints::objc_retainAutoreleasedReturnValue, and clang::CodeGen::ARCEntrypoints::retainAutoreleasedReturnValueMarker.
Referenced by emitAutoreleaseOfResult().
static llvm::Value* tryRemoveRetainOfSelf | ( | CodeGenFunction & | CGF, |
llvm::Value * | result | ||
) | [static] |
If this is a +1 of the value of an immutable 'self', remove it.
Definition at line 2078 of file CGCall.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::CurCodeDecl, eraseUnusedBitCasts(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), clang::ObjCMethodDecl::getSelfDecl(), and clang::CodeGen::ARCEntrypoints::objc_retain.
Referenced by emitAutoreleaseOfResult().