clang API Documentation
#include <CodeGenTypes.h>
CodeGenTypes - This class organizes the cross-module state that is used while lowering AST types to LLVM types.
Definition at line 60 of file CodeGenTypes.h.
| CodeGenTypes::CodeGenTypes | ( | CodeGenModule & | CGM | ) |
Definition at line 30 of file CodeGenTypes.cpp.
| CodeGenTypes::~CodeGenTypes | ( | ) |
Definition at line 39 of file CodeGenTypes.cpp.
| void CodeGenTypes::addRecordTypeName | ( | const RecordDecl * | RD, |
| llvm::StructType * | Ty, | ||
| StringRef | suffix | ||
| ) |
addRecordTypeName - Compute a name from the given record decl with an optional suffix and name the given LLVM type using it.
Definition at line 50 of file CodeGenTypes.cpp.
References clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), clang::TagDecl::getKindName(), clang::NamedDecl::getQualifiedNameAsString(), clang::TagDecl::getTypedefNameForAnonDecl(), and clang::NamedDecl::printName().
Referenced by ConvertRecordDeclType().
| const CGFunctionInfo & CodeGenTypes::arrangeCXXConstructorDeclaration | ( | const CXXConstructorDecl * | D, |
| CXXCtorType | ctorKind | ||
| ) |
Arrange the argument and result information for a declaration or definition to the given constructor variant.
Definition at line 163 of file CGCall.cpp.
References arrangeFunctionType(), clang::CodeGen::CGCXXABI::BuildConstructorSignature(), clang::CodeGen::RequiredArgs::forPrototypePlus(), GetFormalType(), clang::CXXMethodDecl::getParent(), GetThisType(), and clang::ASTContext::VoidTy.
Referenced by arrangeGlobalDeclaration(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), and clang::CodeGen::CodeGenModule::GetAddrOfCXXConstructor().
| const CGFunctionInfo & CodeGenTypes::arrangeCXXDestructor | ( | const CXXDestructorDecl * | D, |
| CXXDtorType | dtorKind | ||
| ) |
Arrange the argument and result information for a declaration, definition, or call to the given destructor variant. It so happens that all three cases produce the same information.
Definition at line 186 of file CGCall.cpp.
References clang::CodeGen::RequiredArgs::All, arrangeFunctionType(), clang::CodeGen::CGCXXABI::BuildDestructorSignature(), GetFormalType(), clang::CXXMethodDecl::getParent(), GetThisType(), and clang::ASTContext::VoidTy.
Referenced by arrangeGlobalDeclaration(), clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualDestructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), EmitObjectDelete(), clang::CodeGen::CodeGenModule::GetAddrOfCXXDestructor(), and GetFunctionTypeForVTable().
| const CGFunctionInfo & CodeGenTypes::arrangeCXXMethodDeclaration | ( | const CXXMethodDecl * | MD | ) |
Arrange the argument and result information for a declaration or definition of the given C++ non-static member function. The member function must be an ordinary function, i.e. not a constructor or destructor.
Definition at line 146 of file CGCall.cpp.
References arrangeCXXMethodType(), arrangeFunctionType(), GetFormalType(), clang::CXXMethodDecl::getParent(), clang::CanQual< T >::getTypePtr(), and clang::CXXMethodDecl::isInstance().
Referenced by arrangeFunctionDeclaration(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallee(), and GetFunctionTypeForVTable().
| const CGFunctionInfo & CodeGenTypes::arrangeCXXMethodType | ( | const CXXRecordDecl * | RD, |
| const FunctionProtoType * | FTP | ||
| ) |
Arrange the argument and result information for a call to an unknown C++ non-static member function of the given abstract type. The member function must be an ordinary function, i.e. not a constructor or destructor.
Definition at line 130 of file CGCall.cpp.
References arrangeFunctionType(), clang::CanQual< T >::getAs(), clang::Type::getCanonicalTypeUnqualified(), and GetThisType().
Referenced by arrangeCXXMethodDeclaration(), and clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer().
| const CGFunctionInfo & CodeGenTypes::arrangeFunctionCall | ( | const CallArgList & | args, |
| const FunctionType * | fnType | ||
| ) |
Figure out the rules for calling a function with the given formal type using the given arguments. The arguments are necessary because the function might be unprototyped, in which case it's target-dependent in crazy ways.
Definition at line 287 of file CGCall.cpp.
References clang::CodeGen::RequiredArgs::All, clang::FunctionType::getExtInfo(), clang::FunctionType::getResultType(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), and clang::TargetCodeGenInfo::isNoProtoCallVariadic().
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), emitStructGetterCall(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CodeGenFunction::GenerateThunk(), and clang::CodeGen::CGObjCRuntime::getMessageSendInfo().
| const CGFunctionInfo & CodeGenTypes::arrangeFunctionCall | ( | QualType | ResTy, |
| const CallArgList & | args, | ||
| const FunctionType::ExtInfo & | info, | ||
| RequiredArgs | required | ||
| ) |
Definition at line 303 of file CGCall.cpp.
References arrangeFunctionType(), clang::ASTContext::getCanonicalParamType(), and GetReturnType().
| const CGFunctionInfo & CodeGenTypes::arrangeFunctionDeclaration | ( | const FunctionDecl * | FD | ) |
Arrange the argument and result information for the declaration or definition of the given function.
Definition at line 204 of file CGCall.cpp.
References clang::CodeGen::RequiredArgs::All, arrangeCXXMethodDeclaration(), arrangeFunctionType(), clang::CanQual< T >::getAs(), and clang::ValueDecl::getType().
Referenced by arrangeGlobalDeclaration(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::generateDestroyHelper(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), and clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction().
| const CGFunctionInfo & CodeGenTypes::arrangeFunctionDeclaration | ( | QualType | ResTy, |
| const FunctionArgList & | Args, | ||
| const FunctionType::ExtInfo & | Info, | ||
| bool | isVariadic | ||
| ) |
Definition at line 317 of file CGCall.cpp.
References clang::CodeGen::RequiredArgs::All, arrangeFunctionType(), clang::ASTContext::getCanonicalParamType(), and GetReturnType().
| const CGFunctionInfo & CodeGenTypes::arrangeFunctionType | ( | CanQual< FunctionProtoType > | FTP | ) |
Arrange the argument and result information for a value of the given function type.
Definition at line 100 of file CGCall.cpp.
Referenced by arrangeCXXConstructorDeclaration(), arrangeCXXDestructor(), arrangeCXXMethodDeclaration(), arrangeCXXMethodType(), arrangeFunctionCall(), arrangeFunctionDeclaration(), arrangeFunctionType(), arrangeFunctionType(), arrangeNullaryFunction(), arrangeObjCMessageSendSignature(), and ConvertType().
| const CGFunctionInfo & CodeGenTypes::arrangeFunctionType | ( | CanQual< FunctionNoProtoType > | FTNP | ) |
Arrange the argument and result information for a value of the given unprototyped function type.
Definition at line 73 of file CGCall.cpp.
References arrangeFunctionType(), and clang::CanQual< T >::getUnqualifiedType().
| const CGFunctionInfo & CodeGenTypes::arrangeFunctionType | ( | CanQualType | resultType, |
| ArrayRef< CanQualType > | argTypes, | ||
| const FunctionType::ExtInfo & | info, | ||
| RequiredArgs | required | ||
| ) |
Retrieves the ABI information for the given function signature. This is the "core" routine to which all the others defer.
| argTypes | - must all actually be canonical as params |
Arrange the argument and result information for an abstract value of a given function type. This is the method which all of the above functions ultimately defer to.
Definition at line 342 of file CGCall.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_end(), clang::ABIArgInfo::canHaveCoerceToType(), ClangCallConvToLLVMCallConv(), clang::ABIInfo::computeInfo(), ConvertType(), clang::serialized_diags::create(), getABIInfo(), clang::FunctionType::ExtInfo::getCC(), clang::ABIArgInfo::getCoerceToType(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::CGFunctionInfo::Profile(), and clang::ABIArgInfo::setCoerceToType().
| const CGFunctionInfo & CodeGenTypes::arrangeGlobalDeclaration | ( | GlobalDecl | GD | ) |
Definition at line 269 of file CGCall.cpp.
References arrangeCXXConstructorDeclaration(), arrangeCXXDestructor(), arrangeFunctionDeclaration(), clang::GlobalDecl::getCtorType(), clang::GlobalDecl::getDecl(), and clang::GlobalDecl::getDtorType().
Referenced by clang::CodeGen::CodeGenFunction::GenerateThunk(), and GetFunctionType().
| const CGFunctionInfo & CodeGenTypes::arrangeNullaryFunction | ( | ) |
getNullaryFunctionInfo - Get the function info for a void() function with standard CC.
Definition at line 333 of file CGCall.cpp.
References clang::CodeGen::RequiredArgs::All, arrangeFunctionType(), and getContext().
Referenced by createAtExitStub().
| const CGFunctionInfo & CodeGenTypes::arrangeObjCMessageSendSignature | ( | const ObjCMethodDecl * | MD, |
| QualType | receiverType | ||
| ) |
Arrange the argument and result information for the function type through which to perform a send to the given Objective-C method, using the given receiver type. The receiver type is not always the 'self' type of the method or even an Objective-C pointer type. This is *not* the right method for actually performing such a message send, due to the possibility of optional arguments.
Definition at line 243 of file CGCall.cpp.
References clang::CodeGen::RequiredArgs::All, arrangeFunctionType(), getCallingConventionForDecl(), clang::ASTContext::getCanonicalParamType(), getContext(), clang::ASTContext::getObjCSelType(), clang::ObjCMethodDecl::getResultType(), GetReturnType(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isVariadic(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), clang::FunctionType::ExtInfo::withCallingConv(), and clang::FunctionType::ExtInfo::withProducesResult().
Referenced by arrangeObjCMethodDeclaration(), and clang::CodeGen::CGObjCRuntime::getMessageSendInfo().
| const CGFunctionInfo & CodeGenTypes::arrangeObjCMethodDeclaration | ( | const ObjCMethodDecl * | MD | ) |
Arrange the argument and result information for the declaration or definition of an Objective-C method.
Definition at line 230 of file CGCall.cpp.
References arrangeObjCMessageSendSignature(), clang::ObjCMethodDecl::getSelfDecl(), and clang::ValueDecl::getType().
Referenced by clang::CodeGen::CodeGenFunction::StartObjCMethod().
| CGRecordLayout * CodeGenTypes::ComputeRecordLayout | ( | const RecordDecl * | D, |
| llvm::StructType * | Ty | ||
| ) |
Compute a new LLVM record layout object for the given record.
Definition at line 995 of file CGRecordLayoutBuilder.cpp.
References clang::CodeGen::CGBitFieldInfo::AccessInfo::AccessWidth, clang::CodeGen::CGRecordLayout::dump(), clang::Decl::dump(), clang::RecordDecl::field_begin(), clang::CodeGen::CGBitFieldInfo::AccessInfo::FieldByteOffset, clang::CodeGen::CGBitFieldInfo::AccessInfo::FieldIndex, clang::ASTContext::getASTRecordLayout(), clang::CodeGen::CGRecordLayout::getBitFieldInfo(), clang::CodeGen::CGBitFieldInfo::getComponent(), getContext(), clang::NamedDecl::getDeclName(), clang::ASTRecordLayout::getFieldCount(), clang::ASTRecordLayout::getFieldOffset(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::CodeGen::CGRecordLayout::getLLVMType(), clang::ASTRecordLayout::getNonVirtualAlign(), clang::ASTRecordLayout::getNonVirtualSize(), clang::CodeGen::CGBitFieldInfo::getNumComponents(), clang::ASTRecordLayout::getSize(), getTargetData(), clang::Decl::hasAttr(), clang::FieldDecl::isBitField(), clang::TagDecl::isUnion(), clang::CharUnits::RoundUpToAlignment(), clang::ASTContext::toBits(), and clang::ASTContext::ZeroBitfieldFollowsNonBitfield().
Referenced by ConvertRecordDeclType().
| llvm::StructType * CodeGenTypes::ConvertRecordDeclType | ( | const RecordDecl * | TD | ) |
ConvertRecordDeclType - Lay out a tagged decl type like struct or union.
Definition at line 571 of file CodeGenTypes.cpp.
References addRecordTypeName(), ComputeRecordLayout(), clang::serialized_diags::create(), clang::RecordDecl::getDefinition(), getLLVMContext(), clang::ASTContext::getTagDeclType(), clang::QualType::getTypePtr(), clang::TagDecl::isCompleteDefinition(), and isSafeToConvert().
Referenced by ConvertType(), getCGRecordLayout(), and UpdateCompletedType().
| llvm::Type * CodeGenTypes::ConvertType | ( | QualType | T | ) |
ConvertType - Convert type T into a llvm::Type.
ConvertType - Convert the specified type to its LLVM form.
Definition at line 282 of file CodeGenTypes.cpp.
References arrangeFunctionType(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), ConvertRecordDeclType(), ConvertTypeForMem(), clang::serialized_diags::create(), clang::ASTContext::getCanonicalType(), getCXXABI(), clang::ArrayType::getElementType(), clang::VectorType::getElementType(), getElementType(), clang::ASTContext::getFloatTypeSemantics(), GetFunctionType(), clang::ArrayType::getIndexTypeCVRQualifiers(), clang::EnumDecl::getIntegerType(), getLLVMContext(), clang::VectorType::getNumElements(), clang::PointerType::getPointeeType(), clang::ReferenceType::getPointeeType(), clang::ConstantArrayType::getSize(), clang::ASTContext::getTargetAddressSpace(), clang::Type::getTypeClass(), getTypeForFormat(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSize(), clang::TagDecl::isCompleteDefinition(), clang::EnumDecl::isFixed(), isFuncTypeConvertible(), and NULL.
Referenced by arrangeFunctionType(), buildBlockDescriptor(), buildGlobalBlock(), computeBlockInfo(), clang::CodeGen::CGCXXABI::ConvertMemberPointerType(), clang::CodeGen::CodeGenFunction::ConvertType(), ConvertTypeForMem(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CodeGenFunction::GenerateObjCCtorDtorMethod(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::CodeGen::CodeGenModule::GetAddrOfConstantString(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CodeGen::CodeGenModule::getBlockDescriptorType(), GetBogusMemberPointer(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), GetExpandedTypes(), GetFunctionType(), getGuardAcquireFn(), clang::CodeGen::CodeGenModule::GetNonVirtualBaseClassOffset(), initializeForBlockHeader(), and UpdateCompletedType().
| llvm::Type * CodeGenTypes::ConvertTypeForMem | ( | QualType | T | ) |
ConvertTypeForMem - Convert type T into a llvm::Type. This differs from ConvertType in that it is used to convert to the memory representation for a type. For example, the scalar representation for _Bool is i1, but the memory representation is usually i8 or i32, depending on the target.
Definition at line 86 of file CodeGenTypes.cpp.
References ConvertType(), getLLVMContext(), and clang::ASTContext::getTypeSize().
Referenced by computeBlockInfo(), ConvertType(), clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CodeGenFunction::CreateStaticVarDecl(), clang::CodeGen::CodeGenModule::EmitConstantExpr(), clang::CodeGen::CodeGenModule::EmitConstantInit(), clang::CodeGen::CodeGenModule::EmitConstantValue(), clang::CodeGen::CodeGenModule::EmitConstantValueForMemory(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalVar(), GetFunctionType(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), and clang::CodeGen::CGBitFieldInfo::MakeInfo().
| const ABIInfo& clang::CodeGen::CodeGenTypes::getABIInfo | ( | ) | const [inline] |
Definition at line 114 of file CodeGenTypes.h.
Referenced by arrangeFunctionType(), and clang::CodeGen::CodeGenFunction::EmitVAArg().
| const CGRecordLayout & CodeGenTypes::getCGRecordLayout | ( | const RecordDecl * | RD | ) |
getCGRecordLayout - Return record layout info for the given record decl.
Definition at line 636 of file CodeGenTypes.cpp.
References ConvertRecordDeclType(), clang::ASTContext::getTagDeclType(), and clang::QualType::getTypePtr().
Referenced by clang::CodeGen::CodeGenFunction::EmitLValueForBitfield(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), EmitNullConstant(), EmitNullConstantForBase(), and isZeroInitializable().
| const CodeGenOptions& clang::CodeGen::CodeGenTypes::getCodeGenOpts | ( | ) | const [inline] |
Definition at line 115 of file CodeGenTypes.h.
Referenced by clang::CodeGen::CGBitFieldInfo::MakeInfo().
| ASTContext& clang::CodeGen::CodeGenTypes::getContext | ( | ) | const [inline] |
Definition at line 113 of file CodeGenTypes.h.
Referenced by arrangeNullaryFunction(), arrangeObjCMessageSendSignature(), ComputeRecordLayout(), GetExpandedTypes(), isSafeToConvert(), and clang::CodeGen::CGBitFieldInfo::MakeInfo().
| CGCXXABI& clang::CodeGen::CodeGenTypes::getCXXABI | ( | ) | const [inline] |
Definition at line 116 of file CodeGenTypes.h.
Referenced by ConvertType(), and isZeroInitializable().
| void CodeGenTypes::GetExpandedTypes | ( | QualType | type, |
| SmallVectorImpl< llvm::Type * > & | expanded | ||
| ) |
GetExpandedTypes - Expand the type
Definition at line 416 of file CGCall.cpp.
References ConvertType(), clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::ASTContext::getAsConstantArrayType(), getContext(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSizeInChars(), clang::RecordDecl::hasFlexibleArrayMember(), clang::FieldDecl::isBitField(), clang::TagDecl::isUnion(), and clang::CharUnits::Zero().
Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList(), and GetFunctionType().
| llvm::FunctionType * CodeGenTypes::GetFunctionType | ( | const CGFunctionInfo & | Info | ) |
GetFunctionType - Get the LLVM function type for.
Definition at line 779 of file CGCall.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_end(), ConvertType(), ConvertTypeForMem(), clang::ABIArgInfo::Direct, clang::ABIArgInfo::Expand, clang::ABIArgInfo::Extend, clang::ABIArgInfo::getCoerceToType(), GetExpandedTypes(), clang::ABIArgInfo::getIndirectAlign(), clang::ABIArgInfo::getKind(), getLLVMContext(), clang::ABIArgInfo::getPaddingType(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::ASTContext::getTargetAddressSpace(), clang::ABIArgInfo::Ignore, clang::ABIArgInfo::Indirect, and clang::CodeGen::CGFunctionInfo::isVariadic().
Referenced by clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualDestructorCall(), ConvertType(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallee(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), EmitObjectDelete(), generateByrefCopyHelper(), generateByrefDisposeHelper(), clang::CodeGen::CodeGenFunction::generateDestroyHelper(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateThunk(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), clang::CodeGen::CodeGenModule::GetAddrOfCXXConstructor(), clang::CodeGen::CodeGenModule::GetAddrOfCXXDestructor(), GetFunctionType(), GetFunctionTypeForVTable(), and clang::CodeGen::CGObjCRuntime::getMessageSendInfo().
| llvm::FunctionType * CodeGenTypes::GetFunctionType | ( | GlobalDecl | GD | ) |
Definition at line 773 of file CGCall.cpp.
References arrangeGlobalDeclaration(), and GetFunctionType().
| llvm::Type * CodeGenTypes::GetFunctionTypeForVTable | ( | GlobalDecl | GD | ) |
GetFunctionTypeForVTable - Get the LLVM function type for use in a vtable, given a CXXMethodDecl. If the method to has an incomplete return type, and/or incomplete argument types, this will return the opaque type.
Definition at line 858 of file CGCall.cpp.
References arrangeCXXDestructor(), arrangeCXXMethodDeclaration(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), GetFunctionType(), getLLVMContext(), clang::ValueDecl::getType(), and isFuncTypeConvertible().
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfThunk().
| llvm::LLVMContext& clang::CodeGen::CodeGenTypes::getLLVMContext | ( | ) | [inline] |
Definition at line 117 of file CodeGenTypes.h.
Referenced by ConvertRecordDeclType(), ConvertType(), ConvertTypeForMem(), GetFunctionType(), and GetFunctionTypeForVTable().
| const TargetInfo& clang::CodeGen::CodeGenTypes::getTarget | ( | ) | const [inline] |
Definition at line 112 of file CodeGenTypes.h.
Referenced by clang::CodeGen::CGBitFieldInfo::MakeInfo().
| const llvm::TargetData& clang::CodeGen::CodeGenTypes::getTargetData | ( | ) | const [inline] |
Definition at line 111 of file CodeGenTypes.h.
Referenced by ComputeRecordLayout(), and clang::CodeGen::CGBitFieldInfo::MakeInfo().
| bool CodeGenTypes::isFuncTypeArgumentConvertible | ( | QualType | Ty | ) |
isFuncTypeArgumentConvertible - Return true if the specified type in a function argument or result position can be converted to an IR type at this point. This boils down to being whether it is complete, as well as whether we've temporarily deferred expanding the type because we're in a recursive context.
Definition at line 194 of file CodeGenTypes.cpp.
References clang::RecordType::getDecl(), clang::Type::isIncompleteType(), and isSafeToConvert().
Referenced by isFuncTypeConvertible().
| bool CodeGenTypes::isFuncTypeConvertible | ( | const FunctionType * | FT | ) |
isFuncTypeConvertible - Utility to check whether a function type can be converted to an LLVM type (i.e. doesn't depend on an incomplete tag type).
Code to verify a given function type is complete, i.e. the return type and all of the argument types are complete. Also check to see if we are in a RS_StructPointer context, and if so whether any struct types have been pended. If so, we don't want to ask the ABI lowering code to handle a type that cannot be converted to an IR type.
Definition at line 223 of file CodeGenTypes.cpp.
References clang::FunctionType::getResultType(), and isFuncTypeArgumentConvertible().
Referenced by ConvertType(), and GetFunctionTypeForVTable().
| bool clang::CodeGen::CodeGenTypes::isRecordBeingLaidOut | ( | const Type * | Ty | ) | const [inline] |
Definition at line 245 of file CodeGenTypes.h.
Referenced by isSafeToConvert().
| bool CodeGenTypes::isRecordLayoutComplete | ( | const Type * | Ty | ) | const |
isRecordLayoutComplete - Return true if the specified type is already completely laid out.
Definition at line 101 of file CodeGenTypes.cpp.
Referenced by isSafeToConvert().
| bool CodeGenTypes::isZeroInitializable | ( | QualType | T | ) |
IsZeroInitializable - Return whether a type can be zero-initialized (in the C++ sense) with an LLVM zeroinitializer.
Definition at line 652 of file CodeGenTypes.cpp.
References clang::ASTContext::getBaseElementType(), getCXXABI(), clang::ASTContext::getLangOpts(), and clang::CodeGen::CGCXXABI::isZeroInitializable().
Referenced by EmitNewInitializer(), EmitNullBaseClassInitialization(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), FillInNullDataMemberPointers(), GetNumNonZeroBytesInInit(), and isSimpleZero().
| bool CodeGenTypes::isZeroInitializable | ( | const CXXRecordDecl * | RD | ) |
IsZeroInitializable - Return whether a record type can be zero-initialized (in the C++ sense) with an LLVM zeroinitializer.
Definition at line 674 of file CodeGenTypes.cpp.
References getCGRecordLayout(), and clang::CodeGen::CGRecordLayout::isZeroInitializable().
| bool clang::CodeGen::CodeGenTypes::noRecordsBeingLaidOut | ( | ) | const [inline] |
Definition at line 242 of file CodeGenTypes.h.
Referenced by isSafeToConvert().
| void CodeGenTypes::UpdateCompletedType | ( | const TagDecl * | TD | ) |
UpdateCompletedType - When we find the full definition for a TagDecl, replace the 'opaque' type we previously made for it if applicable.
Definition at line 237 of file CodeGenTypes.cpp.
References ConvertRecordDeclType(), ConvertType(), clang::ASTContext::getTagDeclType(), clang::QualType::getTypePtr(), and clang::TagDecl::isDependentType().
Referenced by clang::CodeGen::CodeGenModule::UpdateCompletedType().