clang API Documentation
#include "CodeGenModule.h"#include "CGCXXABI.h"#include "clang/AST/RecordLayout.h"#include "clang/AST/Type.h"#include "clang/Frontend/CodeGenOptions.h"#include "CGObjCRuntime.h"#include "clang/AST/BuiltinTypes.def"#include "clang/AST/TypeNodes.def"
Go to the source code of this file.
Defines | |
| #define | BUILTIN_TYPE(Id, SingletonId) |
| #define | PLACEHOLDER_TYPE(Id, SingletonId) case BuiltinType::Id: |
| #define | TYPE(Class, Base) |
| #define | ABSTRACT_TYPE(Class, Base) |
| #define | NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class: |
| #define | NON_CANONICAL_TYPE(Class, Base) case Type::Class: |
| #define | DEPENDENT_TYPE(Class, Base) case Type::Class: |
| #define | TYPE(Class, Base) |
| #define | ABSTRACT_TYPE(Class, Base) |
| #define | NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class: |
| #define | NON_CANONICAL_TYPE(Class, Base) case Type::Class: |
| #define | DEPENDENT_TYPE(Class, Base) case Type::Class: |
Functions | |
| static bool | TypeInfoIsInStandardLibrary (const BuiltinType *Ty) |
| static bool | TypeInfoIsInStandardLibrary (const PointerType *PointerTy) |
| static bool | IsStandardLibraryRTTIDescriptor (QualType Ty) |
| static bool | ShouldUseExternalRTTIDescriptor (CodeGenModule &CGM, QualType Ty) |
| static bool | IsIncompleteClassType (const RecordType *RecordTy) |
| IsIncompleteClassType - Returns whether the given record type is incomplete. | |
| static bool | ContainsIncompleteClassType (QualType Ty) |
| static llvm::GlobalVariable::LinkageTypes | getTypeInfoLinkage (CodeGenModule &CGM, QualType Ty) |
| static bool | CanUseSingleInheritance (const CXXRecordDecl *RD) |
| static void | maybeUpdateRTTILinkage (CodeGenModule &CGM, llvm::GlobalVariable *GV, QualType Ty) |
| static unsigned | ComputeQualifierFlags (Qualifiers Quals) |
| static unsigned | ComputeVMIClassTypeInfoFlags (const CXXBaseSpecifier *Base, SeenBases &Bases) |
| static unsigned | ComputeVMIClassTypeInfoFlags (const CXXRecordDecl *RD) |
| #define ABSTRACT_TYPE | ( | Class, | |
| Base | |||
| ) |
| #define ABSTRACT_TYPE | ( | Class, | |
| Base | |||
| ) |
| #define BUILTIN_TYPE | ( | Id, | |
| SingletonId | |||
| ) |
| #define DEPENDENT_TYPE | ( | Class, | |
| Base | |||
| ) | case Type::Class: |
| #define DEPENDENT_TYPE | ( | Class, | |
| Base | |||
| ) | case Type::Class: |
| #define NON_CANONICAL_TYPE | ( | Class, | |
| Base | |||
| ) | case Type::Class: |
| #define NON_CANONICAL_TYPE | ( | Class, | |
| Base | |||
| ) | case Type::Class: |
| #define NON_CANONICAL_UNLESS_DEPENDENT_TYPE | ( | Class, | |
| Base | |||
| ) | case Type::Class: |
| #define NON_CANONICAL_UNLESS_DEPENDENT_TYPE | ( | Class, | |
| Base | |||
| ) | case Type::Class: |
| #define PLACEHOLDER_TYPE | ( | Id, | |
| SingletonId | |||
| ) | case BuiltinType::Id: |
| #define TYPE | ( | Class, | |
| Base | |||
| ) |
| #define TYPE | ( | Class, | |
| Base | |||
| ) |
| static bool CanUseSingleInheritance | ( | const CXXRecordDecl * | RD | ) | [static] |
Definition at line 354 of file CGRTTI.cpp.
References clang::AS_public, clang::CXXRecordDecl::bases_begin(), clang::CXXBaseSpecifier::getAccessSpecifier(), clang::CXXRecordDecl::getNumBases(), clang::CXXBaseSpecifier::getType(), clang::CXXRecordDecl::isDynamicClass(), clang::CXXRecordDecl::isEmpty(), and clang::CXXBaseSpecifier::isVirtual().
| static unsigned ComputeQualifierFlags | ( | Qualifiers | Quals | ) | [static] |
ComputeQualifierFlags - Compute the pointer type info flags from the given qualifier.
Definition at line 716 of file CGRTTI.cpp.
References clang::Qualifiers::hasConst(), clang::Qualifiers::hasRestrict(), and clang::Qualifiers::hasVolatile().
| static unsigned ComputeVMIClassTypeInfoFlags | ( | const CXXBaseSpecifier * | Base, |
| SeenBases & | Bases | ||
| ) | [static] |
ComputeVMIClassTypeInfoFlags - Compute the value of the flags member in abi::__vmi_class_type_info.
Definition at line 776 of file CGRTTI.cpp.
References clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), clang::CXXBaseSpecifier::getType(), and clang::CXXBaseSpecifier::isVirtual().
Referenced by ComputeVMIClassTypeInfoFlags().
| static unsigned ComputeVMIClassTypeInfoFlags | ( | const CXXRecordDecl * | RD | ) | [static] |
Definition at line 818 of file CGRTTI.cpp.
References clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), and ComputeVMIClassTypeInfoFlags().
| static bool ContainsIncompleteClassType | ( | QualType | Ty | ) | [static] |
ContainsIncompleteClassType - Returns whether the given type contains an incomplete class type. This is true if
The given type is an incomplete class type. The given type is a pointer type whose pointee type contains an incomplete class type. The given type is a member pointer type whose class is an incomplete class type. The given type is a member pointer type whoise pointee type contains an incomplete class type. is an indirect or direct pointer to an incomplete class type.
Definition at line 286 of file CGRTTI.cpp.
References IsIncompleteClassType().
Referenced by getTypeInfoLinkage().
| static llvm::GlobalVariable::LinkageTypes getTypeInfoLinkage | ( | CodeGenModule & | CGM, |
| QualType | Ty | ||
| ) | [static] |
getTypeInfoLinkage - Return the linkage that the type info and type info name constants should have for the given type.
Definition at line 311 of file CGRTTI.cpp.
References ContainsIncompleteClassType(), clang::ExternalLinkage, clang::CodeGen::CodeGenModule::getLangOptions(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::Decl::hasAttr(), clang::InternalLinkage, clang::CXXRecordDecl::isDynamicClass(), clang::NoLinkage, and clang::UniqueExternalLinkage.
Referenced by maybeUpdateRTTILinkage().
| static bool IsIncompleteClassType | ( | const RecordType * | RecordTy | ) | [static] |
IsIncompleteClassType - Returns whether the given record type is incomplete.
Definition at line 271 of file CGRTTI.cpp.
References clang::RecordType::getDecl(), and clang::TagDecl::isCompleteDefinition().
Referenced by ContainsIncompleteClassType().
| static bool IsStandardLibraryRTTIDescriptor | ( | QualType | Ty | ) | [static] |
IsStandardLibraryRTTIDescriptor - Returns whether the type information for the given type exists in the standard library.
Definition at line 233 of file CGRTTI.cpp.
References TypeInfoIsInStandardLibrary().
| static void maybeUpdateRTTILinkage | ( | CodeGenModule & | CGM, |
| llvm::GlobalVariable * | GV, | ||
| QualType | Ty | ||
| ) | [static] |
Definition at line 519 of file CGRTTI.cpp.
References clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CodeGen::CodeGenModule::getModule(), getTypeInfoLinkage(), and clang::MangleContext::mangleCXXRTTIName().
| static bool ShouldUseExternalRTTIDescriptor | ( | CodeGenModule & | CGM, |
| QualType | Ty | ||
| ) | [static] |
ShouldUseExternalRTTIDescriptor - Returns whether the type information for the given type exists somewhere else, and that we should not emit the type information in this translation unit. Assumes that it is not a standard-library type.
Definition at line 250 of file CGRTTI.cpp.
References clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getLangOptions(), clang::CodeGen::CodeGenModule::getVTables(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::isDynamicClass(), and clang::CodeGen::CodeGenVTables::ShouldEmitVTableInThisTU().
| static bool TypeInfoIsInStandardLibrary | ( | const BuiltinType * | Ty | ) | [static] |
TypeInfoIsInStandardLibrary - Given a builtin type, returns whether the type info for that type is defined in the standard library.
Definition at line 161 of file CGRTTI.cpp.
References clang::BuiltinType::getKind().
Referenced by IsStandardLibraryRTTIDescriptor(), and TypeInfoIsInStandardLibrary().
| static bool TypeInfoIsInStandardLibrary | ( | const PointerType * | PointerTy | ) | [static] |
Definition at line 215 of file CGRTTI.cpp.
References clang::Qualifiers::empty(), clang::PointerType::getPointeeType(), clang::QualType::getQualifiers(), clang::Qualifiers::removeConst(), and TypeInfoIsInStandardLibrary().