|
clang 24.0.0git
|
Functions | |
| CanQual< FunctionProtoType > | getFormalType (const CXXMethodDecl *MD) |
| Returns the canonical formal type of the given C++ method. | |
| llvm::FPClassTest | getNoFPClassTestMask (const LangOptions &LangOpts) |
| Returns the set of floating-point value kinds that the language options promise never reach a function's arguments or return value. | |
| bool | baseInitializerUsesThis (ASTContext &Ctx, const Expr *Init) |
Check whether Init uses 'this' in a way which requires the vtable to be properly set. | |
| bool | canSkipVTablePointerInitialization (ASTContext &Ctx, const CXXDestructorDecl *Dtor) |
| Check whether we need to initialize any vtable pointers before calling this destructor. | |
| bool | fieldHasTrivialDestructorBody (ASTContext &Context, const FieldDecl *Field) |
Check whether destructing Field has no observable behaviors, and thus can be skipped when creating a destructor body. | |
| bool | hasUnwindExceptions (const LangOptions &LangOpts) |
| Determines whether the language options require us to model unwind exceptions. | |
| bool | isAAPCS (const TargetInfo &TargetInfo) |
| Helper method to check if the underlying ABI is AAPCS. | |
| bool | isInitializerOfDynamicClass (const CXXCtorInitializer *BaseInit) |
| void | checkTargetFeatures (ASTContext &Ctx, DiagnosticsEngine &Diags, const LangOptions &LangOpts, const CallExpr *E, const FunctionDecl *Caller, const FunctionDecl *TargetDecl) |
| Check that a call to a target-specific builtin has the required target features enabled in the caller, emitting an error diagnostic if not. | |
| void | checkTargetFeatures (ASTContext &Ctx, DiagnosticsEngine &Diags, const LangOptions &LangOpts, SourceLocation Loc, const FunctionDecl *Caller, const FunctionDecl *TargetDecl) |
| Overload taking a raw source location instead of a CallExpr. | |
| QualType | getFixedSizeElementType (const ASTContext &Ctx, const VariableArrayType *VLA) |
Strip off the variably-modified array types wrapping VLA and return the first element type that has a fixed size. | |
| bool | isBlockVarRef (const Expr *E) |
Check whether the value of E is possibly a reference to or into a __block variable. | |
| bool | isCheapEnoughToEvaluateUnconditionally (const Expr *E, const ASTContext &Ctx) |
Check whether E is cheap enough and side-effect-free enough to evaluate unconditionally instead of conditionally. | |
| bool | isTrivialFiller (const Expr *E) |
Check whether E is a trivial array filler, that is, one that is equivalent to zero-initialization. | |
| bool | onlyHasInlineBuiltinDeclaration (const FunctionDecl *FD) |
| Detect the unusual situation where an inline version of a builtin is shadowed by a non-inline version. | |
| bool | shouldEmitLifetimeMarkers (const CodeGenOptions &CGOpts, const LangOptions &LangOpts) |
| Decide whether we need to emit the lifetime markers. | |
| CharUnits | computeOffsetHint (ASTContext &Ctx, const CXXRecordDecl *Src, const CXXRecordDecl *Dst) |
| Compute the src2dst_offset hint as described in the Itanium C++ ABI [2.9.7]. | |
| static bool | hasTrivialDestructorBody (ASTContext &Context, const CXXRecordDecl *BaseClassDecl, const CXXRecordDecl *MostDerivedClassDecl) |
| bool clang::CodeGenUtils::baseInitializerUsesThis | ( | ASTContext & | Ctx, |
| const Expr * | Init ) |
Check whether Init uses 'this' in a way which requires the vtable to be properly set.
Definition at line 33 of file ClassUtils.cpp.
References clang::Init.
Referenced by EmitBaseInitializer(), and clang::CIRGen::CIRGenFunction::emitBaseInitializer().
| bool clang::CodeGenUtils::canSkipVTablePointerInitialization | ( | ASTContext & | Ctx, |
| const CXXDestructorDecl * | Dtor ) |
Check whether we need to initialize any vtable pointers before calling this destructor.
Definition at line 75 of file CodeGenUtils.cpp.
References fieldHasTrivialDestructorBody(), clang::RecordDecl::fields(), clang::CXXRecordDecl::isDynamicClass(), and clang::CXXRecordDecl::isEffectivelyFinal().
Referenced by clang::CodeGen::CodeGenFunction::EmitDestructorBody(), and clang::CIRGen::CIRGenFunction::emitDestructorBody().
| void clang::CodeGenUtils::checkTargetFeatures | ( | ASTContext & | Ctx, |
| DiagnosticsEngine & | Diags, | ||
| const LangOptions & | LangOpts, | ||
| const CallExpr * | E, | ||
| const FunctionDecl * | Caller, | ||
| const FunctionDecl * | TargetDecl ) |
Check that a call to a target-specific builtin has the required target features enabled in the caller, emitting an error diagnostic if not.
caller is the FunctionDecl of the enclosing function (may be null).
Definition at line 123 of file CodeGenUtils.cpp.
References checkTargetFeatures(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::FunctionDecl::getBuiltinID(), clang::NamedDecl::getDeclName(), clang::ASTContext::getFunctionFeatureMap(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::DiagnosticsEngine::Report(), and clang::Result.
Referenced by clang::CIRGen::CIRGenFunction::checkTargetFeatures(), clang::CIRGen::CIRGenFunction::checkTargetFeatures(), clang::CodeGen::CodeGenFunction::checkTargetFeatures(), clang::CodeGen::CodeGenFunction::checkTargetFeatures(), and checkTargetFeatures().
| void clang::CodeGenUtils::checkTargetFeatures | ( | ASTContext & | Ctx, |
| DiagnosticsEngine & | Diags, | ||
| const LangOptions & | LangOpts, | ||
| SourceLocation | Loc, | ||
| const FunctionDecl * | Caller, | ||
| const FunctionDecl * | TargetDecl ) |
Overload taking a raw source location instead of a CallExpr.
Definition at line 149 of file CodeGenUtils.cpp.
References clang::ASTContext::BuiltinInfo, clang::Builtin::evaluateRequiredTargetFeatures(), Feature, clang::ASTContext::filterFunctionTargetAttrs(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), clang::NamedDecl::getDeclName(), clang::ASTContext::getFunctionFeatureMap(), clang::Builtin::Context::getRequiredFeatures(), clang::Decl::hasAttr(), clang::FunctionDecl::isMultiVersion(), and clang::DiagnosticsEngine::Report().
| CharUnits clang::CodeGenUtils::computeOffsetHint | ( | ASTContext & | Ctx, |
| const CXXRecordDecl * | Src, | ||
| const CXXRecordDecl * | Dst ) |
Compute the src2dst_offset hint as described in the Itanium C++ ABI [2.9.7].
Definition at line 15 of file ItaniumCXXABIUtils.cpp.
References clang::AS_public, clang::CharUnits::fromQuantity(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), and clang::CXXRecordDecl::isDerivedFrom().
Referenced by emitDynamicCastInfo().
| bool clang::CodeGenUtils::fieldHasTrivialDestructorBody | ( | ASTContext & | Context, |
| const FieldDecl * | Field ) |
Check whether destructing Field has no observable behaviors, and thus can be skipped when creating a destructor body.
So non-record types, anonymous structs/unions, or record types where the destructor doesnt DO anything are considered as this version of 'trivial'. Note: This is a more liberal definition of trivial destruction than the C++ Standard's version, and thus cannot be used as a substitute for C++ Standard requirements.
Definition at line 58 of file CodeGenUtils.cpp.
References clang::Type::getAsCXXRecordDecl(), and hasTrivialDestructorBody().
Referenced by canSkipVTablePointerInitialization(), and hasTrivialDestructorBody().
| QualType clang::CodeGenUtils::getFixedSizeElementType | ( | const ASTContext & | Ctx, |
| const VariableArrayType * | VLA ) |
Strip off the variably-modified array types wrapping VLA and return the first element type that has a fixed size.
Definition at line 15 of file ExprUtils.cpp.
References clang::ASTContext::getAsVariableArrayType(), and clang::ArrayType::getElementType().
Referenced by emitArraySubscriptGEP(), and emitArraySubscriptPtr().
| CanQual< FunctionProtoType > clang::CodeGenUtils::getFormalType | ( | const CXXMethodDecl * | MD | ) |
Returns the canonical formal type of the given C++ method.
Definition at line 13 of file CallUtils.cpp.
References clang::CanQual< T >::getAs(), clang::Type::getCanonicalTypeUnqualified(), and clang::ValueDecl::getType().
Referenced by clang::CIRGen::CIRGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), clang::CIRGen::CIRGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), and clang::CodeGen::CodeGenTypes::arrangeUnprototypedMustTailThunk().
| llvm::FPClassTest clang::CodeGenUtils::getNoFPClassTestMask | ( | const LangOptions & | LangOpts | ) |
Returns the set of floating-point value kinds that the language options promise never reach a function's arguments or return value.
Definition at line 19 of file CallUtils.cpp.
Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList().
|
static |
Definition at line 20 of file CodeGenUtils.cpp.
References clang::CXXRecordDecl::bases(), fieldHasTrivialDestructorBody(), clang::RecordDecl::fields(), clang::CXXRecordDecl::getDestructor(), clang::FunctionDecl::hasTrivialBody(), clang::CXXRecordDecl::hasTrivialDestructor(), hasTrivialDestructorBody(), clang::NonVirtualBase, clang::CXXRecordDecl::vbases(), and clang::VirtualBase.
Referenced by fieldHasTrivialDestructorBody(), and hasTrivialDestructorBody().
| bool clang::CodeGenUtils::hasUnwindExceptions | ( | const LangOptions & | LangOpts | ) |
Determines whether the language options require us to model unwind exceptions.
We treat -fexceptions as mandating this except under the fragile ObjC ABI with only ObjC exceptions enabled. This means, for example, that C with -fexceptions enables this.
Definition at line 96 of file CodeGenUtils.cpp.
References clang::ObjCRuntime::hasUnwindExceptions(), and clang::LangOptions::ObjCRuntime.
Referenced by clang::CIRGen::CIRGenModule::setCIRFunctionAttributesForDefinition(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().
| bool clang::CodeGenUtils::isAAPCS | ( | const TargetInfo & | TargetInfo | ) |
Helper method to check if the underlying ABI is AAPCS.
Definition at line 113 of file CodeGenUtils.cpp.
References clang::TargetInfo::getABI().
Referenced by clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CIRGen::CIRGenFunction::emitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), and clang::CIRGen::CIRGenFunction::emitStoreThroughBitfieldLValue().
Check whether the value of E is possibly a reference to or into a __block variable.
Definition at line 24 of file ExprUtils.cpp.
References clang::Decl::hasAttr(), clang::Expr::IgnoreParens(), and isBlockVarRef().
Referenced by isBlockVarRef().
| bool clang::CodeGenUtils::isCheapEnoughToEvaluateUnconditionally | ( | const Expr * | E, |
| const ASTContext & | Ctx ) |
Check whether E is cheap enough and side-effect-free enough to evaluate unconditionally instead of conditionally.
This is used to convert control flow into selects in some cases.
Definition at line 87 of file ExprUtils.cpp.
References clang::Expr::IgnoreParens(), and clang::Expr::isEvaluatable().
| bool clang::CodeGenUtils::isInitializerOfDynamicClass | ( | const CXXCtorInitializer * | BaseInit | ) |
Definition at line 116 of file CodeGenUtils.cpp.
References clang::Type::castAsCXXRecordDecl(), clang::CXXCtorInitializer::getBaseClass(), and clang::CXXRecordDecl::isDynamicClass().
Referenced by clang::CodeGen::CodeGenFunction::EmitCtorPrologue(), and clang::CIRGen::CIRGenFunction::emitCtorPrologue().
Check whether E is a trivial array filler, that is, one that is equivalent to zero-initialization.
Definition at line 100 of file ExprUtils.cpp.
References clang::isa(), and isTrivialFiller().
Referenced by isTrivialFiller().
| bool clang::CodeGenUtils::onlyHasInlineBuiltinDeclaration | ( | const FunctionDecl * | FD | ) |
Detect the unusual situation where an inline version of a builtin is shadowed by a non-inline version.
In that case we should pick the external one everywhere. That's GCC behavior too.
Definition at line 121 of file ExprUtils.cpp.
References clang::FunctionDecl::getPreviousDecl().
Referenced by EmitDirectCallee().
| bool clang::CodeGenUtils::shouldEmitLifetimeMarkers | ( | const CodeGenOptions & | CGOpts, |
| const LangOptions & | LangOpts ) |
Decide whether we need to emit the lifetime markers.
Definition at line 13 of file FunctionUtils.cpp.
References clang::SanitizerSet::has(), and clang::LangOptions::Sanitize.
Referenced by clang::CIRGen::CIRGenFunction::CIRGenFunction().