clang 22.0.0git
|
This class organizes the cross-module state that is used while lowering AST types to CIR types. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CIR/CodeGen/CIRGenTypes.h"
Public Types | |
using | TypeCacheTy = llvm::DenseMap< const clang::Type *, mlir::Type > |
This map of clang::Type to mlir::Type (which includes CIR type) is a cache of types that have already been processed. | |
Public Member Functions | |
CIRGenTypes (CIRGenModule &cgm) | |
~CIRGenTypes () | |
CIRGenBuilderTy & | getBuilder () const |
CIRGenModule & | getCGModule () const |
bool | isFuncTypeConvertible (const clang::FunctionType *ft) |
Utility to check whether a function type can be converted to a CIR type (i.e. | |
bool | isFuncParamTypeConvertible (clang::QualType type) |
Return true if the specified type in a function parameter or result position can be converted to a CIR type at this point. | |
clang::CanQualType | deriveThisType (const clang::CXXRecordDecl *rd, const clang::CXXMethodDecl *md) |
Derives the 'this' type for CIRGen purposes, i.e. | |
mlir::MLIRContext & | getMLIRContext () const |
clang::ASTContext & | getASTContext () const |
bool | isRecordLayoutComplete (const clang::Type *ty) const |
Return true if the specified type is already completely laid out. | |
bool | noRecordsBeingLaidOut () const |
bool | isRecordBeingLaidOut (const clang::Type *ty) const |
const ABIInfo & | getABIInfo () const |
mlir::Type | convertType (clang::QualType type) |
Convert a Clang type into a mlir::Type. | |
mlir::Type | convertRecordDeclType (const clang::RecordDecl *recordDecl) |
Lay out a tagged decl type like struct or union. | |
std::unique_ptr< CIRGenRecordLayout > | computeRecordLayout (const clang::RecordDecl *rd, cir::RecordType *ty) |
std::string | getRecordTypeName (const clang::RecordDecl *, llvm::StringRef suffix) |
const CIRGenRecordLayout & | getCIRGenRecordLayout (const clang::RecordDecl *rd) |
Return record layout info for the given record decl. | |
mlir::Type | convertTypeForMem (clang::QualType, bool forBitField=false) |
Convert type T into an mlir::Type. | |
cir::FuncType | getFunctionType (const CIRGenFunctionInfo &info) |
Get the CIR function type for. | |
cir::FuncType | getFunctionType (clang::GlobalDecl gd) |
cir::FuncType | getFunctionTypeForVTable (clang::GlobalDecl gd) |
Get the CIR function type for use in a vtable, given a CXXMethodDecl. | |
const CIRGenFunctionInfo & | arrangeGlobalDeclaration (GlobalDecl gd) |
void | updateCompletedType (const clang::TagDecl *td) |
UpdateCompletedType - when we find the full definition for a TagDecl, replace the 'opaque' type we previously made for it if applicable. | |
const CIRGenFunctionInfo & | arrangeFunctionDeclaration (const clang::FunctionDecl *fd) |
Free functions are functions that are compatible with an ordinary C function pointer type. | |
bool | isZeroInitializable (clang::QualType ty) |
Return whether a type can be zero-initialized (in the C++ sense) with an LLVM zeroinitializer. | |
bool | isZeroInitializable (const RecordDecl *rd) |
const CIRGenFunctionInfo & | arrangeCXXConstructorCall (const CallArgList &args, const clang::CXXConstructorDecl *d, clang::CXXCtorType ctorKind, bool passProtoArgs=true) |
Arrange a call to a C++ method, passing the given arguments. | |
const CIRGenFunctionInfo & | arrangeCXXMethodCall (const CallArgList &args, const clang::FunctionProtoType *type, RequiredArgs required, unsigned numPrefixArgs) |
Arrange a call to a C++ method, passing the given arguments. | |
const CIRGenFunctionInfo & | arrangeCXXMethodDeclaration (const clang::CXXMethodDecl *md) |
C++ methods have some special rules and also have implicit parameters. | |
const CIRGenFunctionInfo & | arrangeCXXStructorDeclaration (clang::GlobalDecl gd) |
const CIRGenFunctionInfo & | arrangeCXXMethodType (const clang::CXXRecordDecl *rd, const clang::FunctionProtoType *ftp, const clang::CXXMethodDecl *md) |
Arrange the argument and result information for a call to an unknown C++ non-static member function of the given abstract type. | |
const CIRGenFunctionInfo & | arrangeFreeFunctionCall (const CallArgList &args, const FunctionType *fnType) |
const CIRGenFunctionInfo & | arrangeCIRFunctionInfo (CanQualType returnType, llvm::ArrayRef< CanQualType > argTypes, RequiredArgs required) |
const CIRGenFunctionInfo & | arrangeFreeFunctionType (CanQual< FunctionProtoType > fpt) |
const CIRGenFunctionInfo & | arrangeFreeFunctionType (CanQual< FunctionNoProtoType > fnpt) |
Public Attributes | |
TypeCacheTy | typeCache |
This class organizes the cross-module state that is used while lowering AST types to CIR types.
Definition at line 48 of file CIRGenTypes.h.
using clang::CIRGen::CIRGenTypes::TypeCacheTy = llvm::DenseMap<const clang::Type *, mlir::Type> |
This map of clang::Type to mlir::Type (which includes CIR type) is a cache of types that have already been processed.
Definition at line 96 of file CIRGenTypes.h.
CIRGenTypes::CIRGenTypes | ( | CIRGenModule & | cgm | ) |
Definition at line 16 of file CIRGenTypes.cpp.
CIRGenTypes::~CIRGenTypes | ( | ) |
Definition at line 21 of file CIRGenTypes.cpp.
const CIRGenFunctionInfo & CIRGenTypes::arrangeCIRFunctionInfo | ( | CanQualType | returnType, |
llvm::ArrayRef< CanQualType > | argTypes, | ||
RequiredArgs | required | ||
) |
Definition at line 586 of file CIRGenTypes.cpp.
References clang::CIRGen::CIRGenFunctionInfo::argTypesBegin(), clang::CIRGen::CIRGenFunctionInfo::argTypesEnd(), clang::CIRGen::CIRGenFunctionInfo::create(), clang::CIRGen::CIRGenFunctionInfo::getReturnType(), clang::CanQual< T >::isCanonicalAsParam(), cir::MissingFeatures::opCallCallConv(), and clang::CIRGen::CIRGenFunctionInfo::Profile().
Referenced by arrangeCIRFunctionInfo(), arrangeCXXConstructorCall(), arrangeCXXMethodCall(), arrangeCXXStructorDeclaration(), arrangeFreeFunctionLikeCall(), arrangeFreeFunctionType(), and arrangeFunctionDeclaration().
const CIRGenFunctionInfo & CIRGenTypes::arrangeCXXConstructorCall | ( | const CallArgList & | args, |
const clang::CXXConstructorDecl * | d, | ||
clang::CXXCtorType | ctorKind, | ||
bool | passProtoArgs = true |
||
) |
Arrange a call to a C++ method, passing the given arguments.
passProtoArgs indicates whether args
has args for the parameters in the given CXXConstructorDecl.
Definition at line 329 of file CIRGenCall.cpp.
References clang::CIRGen::RequiredArgs::All, arrangeCIRFunctionInfo(), clang::CIRGen::CIRGenModule::errorNYI(), clang::ASTContext::getCanonicalParamType(), getFormalType(), clang::CIRGen::RequiredArgs::getFromProtoWithExtraSlots(), clang::FunctionDecl::getSourceRange(), clang::CIRGen::CIRGenCXXABI::hasMostDerivedReturn(), clang::CIRGen::CIRGenCXXABI::hasThisReturn(), cir::MissingFeatures::implicitConstructorArgs(), cir::MissingFeatures::opCallCIRGenFuncInfoExtParamInfo(), cir::MissingFeatures::opCallFnInfoOpts(), and clang::ASTContext::VoidTy.
Referenced by clang::CIRGen::CIRGenFunction::emitCXXConstructorCall().
const CIRGenFunctionInfo & CIRGenTypes::arrangeCXXMethodCall | ( | const CallArgList & | args, |
const clang::FunctionProtoType * | type, | ||
RequiredArgs | required, | ||
unsigned | numPrefixArgs | ||
) |
Arrange a call to a C++ method, passing the given arguments.
numPrefixArgs is the number of the ABI-specific prefix arguments we have. It does not count this
.
Definition at line 367 of file CIRGenCall.cpp.
References arrangeCIRFunctionInfo(), clang::ASTContext::getCanonicalParamType(), clang::Type::getCanonicalTypeUnqualified(), clang::FunctionType::getReturnType(), clang::CanQual< T >::getUnqualifiedType(), cir::MissingFeatures::opCallExtParameterInfo(), and cir::MissingFeatures::opCallFnInfoOpts().
Referenced by clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorCall().
const CIRGenFunctionInfo & CIRGenTypes::arrangeCXXMethodDeclaration | ( | const clang::CXXMethodDecl * | md | ) |
C++ methods have some special rules and also have implicit parameters.
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 396 of file CIRGenCall.cpp.
References arrangeCXXMethodType(), arrangeFreeFunctionType(), cir::MissingFeatures::cudaSupport(), clang::CanQual< T >::getAs(), clang::Type::getCanonicalTypeUnqualified(), clang::CIRGen::CIRGenCXXABI::getThisArgumentTypeForMethod(), clang::ValueDecl::getType(), and clang::CXXMethodDecl::isInstance().
Referenced by arrangeFunctionDeclaration(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(), and clang::CIRGen::CIRGenModule::getAddrOfGlobal().
const CIRGenFunctionInfo & CIRGenTypes::arrangeCXXMethodType | ( | const clang::CXXRecordDecl * | rd, |
const clang::FunctionProtoType * | ftp, | ||
const clang::CXXMethodDecl * | md | ||
) |
Arrange the argument and result information for a call to an unknown C++ non-static member function of the given abstract type.
(A null RD means we don't have any meaningful "this" argument type, so fall back to a generic pointer type). The member fucntion must be an ordinary function, i.e. not a constructor or destructor.
Definition at line 419 of file CIRGenCall.cpp.
References deriveThisType(), clang::CanQual< T >::getAs(), clang::Type::getCanonicalTypeUnqualified(), and cir::MissingFeatures::opCallFnInfoOpts().
Referenced by arrangeCXXMethodDeclaration().
const CIRGenFunctionInfo & CIRGenTypes::arrangeCXXStructorDeclaration | ( | clang::GlobalDecl | gd | ) |
Definition at line 179 of file CIRGenCall.cpp.
References clang::CIRGen::RequiredArgs::All, appendParameterTypes(), arrangeCIRFunctionInfo(), deriveThisType(), clang::CIRGen::CIRGenModule::errorNYI(), clang::GlobalDecl::getDecl(), getFormalType(), clang::CIRGen::CIRGenCXXABI::hasMostDerivedReturn(), clang::CIRGen::CIRGenCXXABI::hasThisReturn(), cir::MissingFeatures::implicitConstructorArgs(), cir::MissingFeatures::opCallCIRGenFuncInfoExtParamInfo(), cir::MissingFeatures::opCallFnInfoOpts(), clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by clang::CIRGen::CIRGenModule::codegenCXXStructor(), clang::CIRGen::CIRGenModule::emitAliasForGlobal(), clang::CIRGen::CIRGenFunction::emitCXXDestructorCall(), and clang::CIRGen::CIRGenModule::getAddrAndTypeOfCXXStructor().
const CIRGenFunctionInfo & CIRGenTypes::arrangeFreeFunctionCall | ( | const CallArgList & | args, |
const FunctionType * | fnType | ||
) |
Definition at line 387 of file CIRGenCall.cpp.
References arrangeFreeFunctionLikeCall().
Referenced by clang::CIRGen::CIRGenFunction::emitCall(), and emitNewDeleteCall().
const CIRGenFunctionInfo & CIRGenTypes::arrangeFreeFunctionType | ( | CanQual< FunctionNoProtoType > | fnpt | ) |
Definition at line 494 of file CIRGenCall.cpp.
References arrangeCIRFunctionInfo(), clang::CanQual< T >::getUnqualifiedType(), and cir::MissingFeatures::opCallFnInfoOpts().
const CIRGenFunctionInfo & CIRGenTypes::arrangeFreeFunctionType | ( | CanQual< FunctionProtoType > | fpt | ) |
Definition at line 487 of file CIRGenCall.cpp.
References cir::MissingFeatures::opCallFnInfoOpts().
Referenced by arrangeCXXMethodDeclaration(), and arrangeFunctionDeclaration().
const CIRGenFunctionInfo & CIRGenTypes::arrangeFunctionDeclaration | ( | const clang::FunctionDecl * | fd | ) |
Free functions are functions that are compatible with an ordinary C function pointer type.
Arrange the argument and result information for the declaration or definition of the given function.
Definition at line 436 of file CIRGenCall.cpp.
References clang::CIRGen::RequiredArgs::All, arrangeCIRFunctionInfo(), arrangeCXXMethodDeclaration(), arrangeFreeFunctionType(), clang::CanQual< T >::castAs(), cir::MissingFeatures::cudaSupport(), clang::CanQual< T >::getAs(), clang::Type::getCanonicalTypeUnqualified(), clang::ValueDecl::getType(), cir::MissingFeatures::opCallCIRGenFuncInfoExtParamInfo(), and cir::MissingFeatures::opCallFnInfoOpts().
Referenced by arrangeGlobalDeclaration().
const CIRGenFunctionInfo & CIRGenTypes::arrangeGlobalDeclaration | ( | GlobalDecl | gd | ) |
Definition at line 616 of file CIRGenTypes.cpp.
References arrangeFunctionDeclaration(), clang::CIRGen::CIRGenModule::errorNYI(), and clang::GlobalDecl::getDecl().
Referenced by clang::CIRGen::CIRGenModule::emitGlobalFunctionDefinition(), clang::CIRGen::CIRGenModule::getAddrOfGlobal(), and getFunctionType().
std::unique_ptr< CIRGenRecordLayout > CIRGenTypes::computeRecordLayout | ( | const clang::RecordDecl * | rd, |
cir::RecordType * | ty | ||
) |
Definition at line 615 of file CIRGenRecordLayoutBuilder.cpp.
References cir::MissingFeatures::astRecordDeclAttr(), cir::MissingFeatures::bitfields(), bool, clang::Decl::dump(), getASTContext(), clang::CIRGen::CIRGenBuilderTy::getCompleteRecordTy(), getRecordTypeName(), clang::Decl::hasAttr(), clang::TagDecl::isUnion(), and cir::MissingFeatures::recordZeroInit().
Referenced by convertRecordDeclType().
mlir::Type CIRGenTypes::convertRecordDeclType | ( | const clang::RecordDecl * | recordDecl | ) |
Lay out a tagged decl type like struct or union.
Definition at line 214 of file CIRGenTypes.cpp.
References computeRecordLayout(), convertRecordDeclType(), clang::ast_matchers::cxxRecordDecl, clang::ASTContext::getCanonicalTagType(), clang::RecordDecl::getDefinition(), clang::CIRGen::CIRGenBuilderTy::getIncompleteRecordTy(), getRecordTypeName(), clang::CanQual< T >::getTypePtr(), clang::TagDecl::isCompleteDefinition(), isSafeToConvert(), and cir::MissingFeatures::skippedLayout().
Referenced by convertRecordDeclType(), convertType(), getCIRGenRecordLayout(), and updateCompletedType().
mlir::Type CIRGenTypes::convertType | ( | clang::QualType | type | ) |
Convert a Clang type into a mlir::Type.
Definition at line 276 of file CIRGenTypes.cpp.
References clang::CIRGen::CIRGenTypeCache::BFloat16Ty, clang::Type::castAsEnumDecl(), convertRecordDeclType(), convertType(), convertTypeForMem(), clang::CIRGen::CIRGenTypeCache::DoubleTy, clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenTypeCache::FloatTy, clang::CIRGen::CIRGenTypeCache::FP128Ty, clang::CIRGen::CIRGenTypeCache::FP16Ty, clang::ASTContext::getCanonicalType(), clang::ArrayType::getElementType(), clang::VectorType::getElementType(), clang::ASTContext::getFloatTypeSemantics(), clang::ArrayType::getIndexTypeCVRQualifiers(), getKind(), clang::ASTContext::getLangOpts(), clang::CIRGen::CIRGenBuilderTy::getLongDoubleTy(), getMLIRContext(), clang::VectorType::getNumElements(), clang::PointerType::getPointeeType(), clang::ReferenceType::getPointeeType(), cir::CIRBaseBuilderTy::getPointerTo(), clang::ConstantArrayType::getSize(), clang::ASTContext::getTargetInfo(), clang::Type::getTypeClass(), clang::ASTContext::getTypeSize(), cir::CIRBaseBuilderTy::getVoidPtrTy(), clang::Type::isConstantMatrixType(), cir::isSized(), clang::ast_matchers::recordType, clang::CIRGen::CIRGenTypeCache::SInt32Ty, clang::CIRGen::CIRGenTypeCache::SInt8Ty, clang::ast_matchers::type, typeCache, clang::CIRGen::CIRGenTypeCache::UInt32Ty, clang::TargetInfo::useFP16ConversionIntrinsics(), and clang::CIRGen::CIRGenTypeCache::VoidTy.
Referenced by clang::CIRGen::CIRGenFunction::convertType(), clang::CIRGen::CIRGenModule::convertType(), convertType(), convertTypeForMem(), getFunctionType(), and updateCompletedType().
mlir::Type CIRGenTypes::convertTypeForMem | ( | clang::QualType | qualType, |
bool | forBitField = false |
||
) |
Convert type T into an mlir::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 519 of file CIRGenTypes.cpp.
References convertType(), and clang::ast_matchers::qualType.
Referenced by convertType(), clang::CIRGen::CIRGenFunction::convertTypeForMem(), clang::CIRGen::CIRGenModule::getAddrOfGlobalVar(), clang::CIRGen::CIRGenModule::getAddrOfGlobalVarAttr(), clang::CIRGen::CIRGenModule::getOrCreateCIRGlobal(), and clang::CIRGen::CIRGenModule::getOrCreateStaticVarDecl().
CanQualType CIRGenTypes::deriveThisType | ( | const clang::CXXRecordDecl * | rd, |
const clang::CXXMethodDecl * | md | ||
) |
Derives the 'this' type for CIRGen purposes, i.e.
ignoring method CVR qualification.
ignoring method CVR qualification. Either or both of rd
and md
may be null. A null rd
indicates that there is no meaningful 'this' type, and a null md
can occur when calling a method pointer.
Definition at line 224 of file CIRGenCall.cpp.
References clang::CanQual< Type >::CreateUnsafe(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Qualifiers::getAddressSpace(), getASTContext(), clang::ASTContext::getCanonicalTagType(), clang::CXXMethodDecl::getMethodQualifiers(), clang::ASTContext::getPointerType(), and clang::ASTContext::VoidTy.
Referenced by arrangeCXXMethodType(), arrangeCXXStructorDeclaration(), and commonBuildCXXMemberOrOperatorCall().
|
inline |
Definition at line 108 of file CIRGenTypes.h.
|
inline |
Definition at line 100 of file CIRGenTypes.h.
Referenced by arrangeFreeFunctionLikeCall(), computeRecordLayout(), deriveThisType(), and isSafeToConvert().
|
inline |
Definition at line 81 of file CIRGenTypes.h.
|
inline |
Definition at line 82 of file CIRGenTypes.h.
Referenced by appendParameterTypes().
const CIRGenRecordLayout & CIRGenTypes::getCIRGenRecordLayout | ( | const clang::RecordDecl * | rd | ) |
Return record layout info for the given record decl.
Definition at line 537 of file CIRGenTypes.cpp.
References convertRecordDeclType(), clang::ASTContext::getCanonicalTagType(), and clang::CanQual< T >::getTypePtr().
Referenced by clang::CIRGen::CIRGenFunction::emitAddrOfFieldStorage(), clang::CIRGen::CIRGenFunction::emitLValueForBitField(), clang::CIRGen::CIRGenFunction::emitLValueForField(), clang::CIRGen::CIRGenFunction::emitLValueForFieldInitialization(), and isZeroInitializable().
cir::FuncType CIRGenTypes::getFunctionType | ( | clang::GlobalDecl | gd | ) |
Definition at line 45 of file CIRGenCall.cpp.
References arrangeGlobalDeclaration(), and getFunctionType().
cir::FuncType CIRGenTypes::getFunctionType | ( | const CIRGenFunctionInfo & | info | ) |
Get the CIR function type for.
Definition at line 50 of file CIRGenCall.cpp.
References convertType(), clang::CIRGen::CIRGenFunctionInfo::getNumRequiredArgs(), clang::CIRGen::CIRGenFunctionInfo::getReturnType(), clang::CIRGen::CIRGenBuilderTy::getVoidTy(), clang::CIRGen::CIRGenFunctionInfo::isVariadic(), and clang::CIRGen::CIRGenFunctionInfo::requiredArguments().
Referenced by clang::CIRGen::CIRGenModule::codegenCXXStructor(), clang::CIRGen::CIRGenModule::emitAliasForGlobal(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(), clang::CIRGen::CIRGenModule::emitGlobalFunctionDefinition(), clang::CIRGen::CIRGenModule::getAddrAndTypeOfCXXStructor(), clang::CIRGen::CIRGenModule::getAddrOfGlobal(), getFunctionType(), and getFunctionTypeForVTable().
cir::FuncType CIRGenTypes::getFunctionTypeForVTable | ( | clang::GlobalDecl | gd | ) |
Get the CIR function type for use in a vtable, given a CXXMethodDecl.
If the method has an incomplete return type, and/or incomplete argument types, this will return the opaque type.
Definition at line 63 of file CIRGenCall.cpp.
References clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::getAs(), clang::GlobalDecl::getDecl(), getFunctionType(), clang::ValueDecl::getType(), and isFuncTypeConvertible().
mlir::MLIRContext & CIRGenTypes::getMLIRContext | ( | ) | const |
Definition at line 26 of file CIRGenTypes.cpp.
Referenced by convertType().
std::string CIRGenTypes::getRecordTypeName | ( | const clang::RecordDecl * | , |
llvm::StringRef | suffix | ||
) |
Definition at line 94 of file CIRGenTypes.cpp.
References clang::PrintingPolicy::AlwaysIncludeTypeForTemplateArgument, clang::ASTContext::getCanonicalTagType(), clang::CIRGen::CIRGenBuilderTy::getUniqueAnonRecordName(), clang::CIRGen::CIRGenBuilderTy::getUniqueRecordName(), clang::QualType::print(), clang::PrintingPolicy::PrintAsCanonical, clang::ast_matchers::recordDecl, clang::PrintingPolicy::SuppressInlineNamespace, clang::PrintingPolicy::SuppressTagKeyword, and clang::ast_matchers::typedefNameDecl.
Referenced by computeRecordLayout(), and convertRecordDeclType().
bool CIRGenTypes::isFuncParamTypeConvertible | ( | clang::QualType | type | ) |
Return true if the specified type in a function parameter or result position can be converted to a CIR 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 34 of file CIRGenTypes.cpp.
References clang::ast_matchers::tagType, and clang::ast_matchers::type.
Referenced by isFuncTypeConvertible().
bool CIRGenTypes::isFuncTypeConvertible | ( | const clang::FunctionType * | ft | ) |
Utility to check whether a function type can be converted to a CIR type (i.e.
Code to verify a given function type is complete, i.e.
doesn't depend on an incomplete tag type).
the return type and all of the parameter 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 a CIR type.
Definition at line 53 of file CIRGenTypes.cpp.
References clang::FunctionType::getReturnType(), and isFuncParamTypeConvertible().
Referenced by getFunctionTypeForVTable().
|
inline |
Definition at line 104 of file CIRGenTypes.h.
Referenced by isSafeToConvert().
bool CIRGenTypes::isRecordLayoutComplete | ( | const clang::Type * | ty | ) | const |
Return true if the specified type is already completely laid out.
Definition at line 120 of file CIRGenTypes.cpp.
Referenced by isSafeToConvert().
bool CIRGenTypes::isZeroInitializable | ( | clang::QualType | ty | ) |
Return whether a type can be zero-initialized (in the C++ sense) with an LLVM zeroinitializer.
Definition at line 556 of file CIRGenTypes.cpp.
References clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::Type::getAsRecordDecl(), clang::ASTContext::getConstantArrayElementCount(), clang::ASTContext::getTargetNullPointerValue(), and isZeroInitializable().
Referenced by clang::CIRGen::CIRGenFunction::emitNullInitialization(), isZeroInitializable(), and clang::CIRGen::ConstantEmitter::tryEmitPrivateForVarInit().
bool CIRGenTypes::isZeroInitializable | ( | const RecordDecl * | rd | ) |
Definition at line 581 of file CIRGenTypes.cpp.
References getCIRGenRecordLayout(), and clang::CIRGen::CIRGenRecordLayout::isZeroInitializable().
|
inline |
Definition at line 103 of file CIRGenTypes.h.
Referenced by isSafeToConvert().
void CIRGenTypes::updateCompletedType | ( | const clang::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 632 of file CIRGenTypes.cpp.
References convertRecordDeclType(), convertType(), cir::MissingFeatures::generateDebugInfo(), clang::ASTContext::getCanonicalTagType(), clang::CanQual< T >::getTypePtr(), and typeCache.
Referenced by clang::CIRGen::CIRGenModule::updateCompletedType().
TypeCacheTy clang::CIRGen::CIRGenTypes::typeCache |
Definition at line 97 of file CIRGenTypes.h.
Referenced by convertType(), and updateCompletedType().