|
clang 24.0.0git
|
Functions | |
| 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) |
| static bool | hasTrivialDestructorBody (ASTContext &Context, const CXXRecordDecl *BaseClassDecl, const CXXRecordDecl *MostDerivedClassDecl) |
| 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 69 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().
| 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 52 of file CodeGenUtils.cpp.
References clang::Type::getAsCXXRecordDecl(), and hasTrivialDestructorBody().
Referenced by canSkipVTablePointerInitialization(), and hasTrivialDestructorBody().
|
static |
Definition at line 14 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 90 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 107 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().
| bool clang::CodeGenUtils::isInitializerOfDynamicClass | ( | const CXXCtorInitializer * | BaseInit | ) |
Definition at line 110 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().