clang: lib/CodeGen/CGDebugInfo.cpp File Reference (original) (raw)
#include "[CGDebugInfo.h](CGDebugInfo%5F8h%5Fsource.html)"
#include "[CGBlocks.h](CGBlocks%5F8h%5Fsource.html)"
#include "[CGCXXABI.h](CGCXXABI%5F8h%5Fsource.html)"
#include "[CGObjCRuntime.h](CGObjCRuntime%5F8h%5Fsource.html)"
#include "[CGRecordLayout.h](CGRecordLayout%5F8h%5Fsource.html)"
#include "[CodeGenFunction.h](CodeGenFunction%5F8h%5Fsource.html)"
#include "[CodeGenModule.h](CodeGenModule%5F8h%5Fsource.html)"
#include "[ConstantEmitter.h](ConstantEmitter%5F8h%5Fsource.html)"
#include "[TargetInfo.h](lib%5F2CodeGen%5F2TargetInfo%5F8h%5Fsource.html)"
#include "[clang/AST/ASTContext.h](ASTContext%5F8h%5Fsource.html)"
#include "[clang/AST/Attr.h](AST%5F2Attr%5F8h%5Fsource.html)"
#include "[clang/AST/DeclCXX.h](DeclCXX%5F8h%5Fsource.html)"
#include "[clang/AST/DeclFriend.h](DeclFriend%5F8h%5Fsource.html)"
#include "[clang/AST/DeclObjC.h](DeclObjC%5F8h%5Fsource.html)"
#include "[clang/AST/DeclTemplate.h](DeclTemplate%5F8h%5Fsource.html)"
#include "[clang/AST/Expr.h](Expr%5F8h%5Fsource.html)"
#include "[clang/AST/RecordLayout.h](RecordLayout%5F8h%5Fsource.html)"
#include "[clang/AST/RecursiveASTVisitor.h](RecursiveASTVisitor%5F8h%5Fsource.html)"
#include "[clang/AST/VTableBuilder.h](VTableBuilder%5F8h%5Fsource.html)"
#include "[clang/Basic/CodeGenOptions.h](CodeGenOptions%5F8h%5Fsource.html)"
#include "[clang/Basic/SourceManager.h](SourceManager%5F8h%5Fsource.html)"
#include "[clang/Basic/Version.h](Version%5F8h%5Fsource.html)"
#include "[clang/CodeGen/ModuleBuilder.h](ModuleBuilder%5F8h%5Fsource.html)"
#include "[clang/Frontend/FrontendOptions.h](FrontendOptions%5F8h%5Fsource.html)"
#include "[clang/Lex/HeaderSearchOptions.h](HeaderSearchOptions%5F8h%5Fsource.html)"
#include "[clang/Lex/ModuleMap.h](ModuleMap%5F8h%5Fsource.html)"
#include "[clang/Lex/PreprocessorOptions.h](PreprocessorOptions%5F8h%5Fsource.html)"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SHA1.h"
#include "llvm/Support/SHA256.h"
#include "llvm/Support/TimeProfiler.h"
#include <optional>
#include "clang/AST/BuiltinTypes.def"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"
#include "clang/Basic/HLSLIntangibleTypes.def"
#include "clang/Basic/AArch64SVEACLETypes.def"
#include "clang/Basic/PPCTypes.def"
#include "clang/Basic/RISCVVTypes.def"
#include "clang/Basic/WebAssemblyReferenceTypes.def"
#include "clang/Basic/AMDGPUTypes.def"
#include "clang/AST/TypeNodes.inc"
Go to the source code of this file.
Macros | |
---|---|
#define | BUILTIN_TYPE(Id, SingletonId) |
#define | PLACEHOLDER_TYPE(Id, SingletonId) case BuiltinType::Id: |
#define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) |
#define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) |
#define | HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) |
#define | SVE_TYPE(Name, Id, SingletonId) case BuiltinType::Id: |
#define | PPC_VECTOR_TYPE(Name, Id, size) case BuiltinType::Id: |
#define | RVV_TYPE(Name, Id, SingletonId) case BuiltinType::Id: |
#define | WASM_REF_TYPE(Name, MangledName, Id, SingletonId, AS) |
#define | AMDGPU_OPAQUE_PTR_TYPE(Name, Id, SingletonId, Width, Align, AS) |
#define | AMDGPU_NAMED_BARRIER_TYPE(Name, Id, SingletonId, Width, Align, Scope) |
#define | TYPE(Class, Base) |
#define | ABSTRACT_TYPE(Class, Base) |
#define | NON_CANONICAL_TYPE(Class, Base) |
#define | DEPENDENT_TYPE(Class, Base) case Type::Class: |
Functions | |
---|---|
static uint32_t | getTypeAlignIfRequired (const Type *Ty, const ASTContext &Ctx) |
static uint32_t | getTypeAlignIfRequired (QualType Ty, const ASTContext &Ctx) |
static uint32_t | getDeclAlignIfRequired (const Decl *D, const ASTContext &Ctx) |
static bool | IsDecomposedVarDecl (VarDecl const *VD) |
Returns true if VD is a a holding variable (aka a VarDecl retrieved using BindingDecl::getHoldingVar). | |
static bool | IsArtificial (VarDecl const *VD) |
Returns true if VD is a compiler-generated variable and should be treated as artificial for the purposes of debug-info generation. | |
static void | stripUnusedQualifiers (Qualifiers &Q) |
static llvm::dwarf::Tag | getNextQualifier (Qualifiers &Q) |
static bool | hasCXXMangling (const TagDecl *TD, llvm::DICompileUnit *TheCU) |
static bool | needsTypeIdentifier (const TagDecl *TD, CodeGenModule &CGM, llvm::DICompileUnit *TheCU) |
static SmallString< 256 > | getTypeIdentifier (const TagType *Ty, CodeGenModule &CGM, llvm::DICompileUnit *TheCU) |
static llvm::dwarf::Tag | getTagForRecord (const RecordDecl *RD) |
static llvm::SmallVector< TemplateArgument > | GetTemplateArgs (const TemplateDecl *TD, const TemplateSpecializationType *Ty) |
static llvm::DINode::DIFlags | getAccessFlag (AccessSpecifier Access, const RecordDecl *RD) |
Convert an AccessSpecifier into the corresponding DINode flag. | |
static unsigned | getDwarfCC (CallingConv CC) |
static llvm::DINode::DIFlags | getRefFlags (const FunctionProtoType *Func) |
static bool | isFunctionLocalClass (const CXXRecordDecl *RD) |
isFunctionLocalClass - Return true if CXXRecordDecl is defined inside a function. | |
static bool | isClassOrMethodDLLImport (const CXXRecordDecl *RD) |
Return true if the class or any of its methods are marked dllimport. | |
static bool | isDefinedInClangModule (const RecordDecl *RD) |
Does a type definition exist in an imported clang module? | |
static bool | hasExplicitMemberDefinition (CXXRecordDecl::method_iterator I, CXXRecordDecl::method_iterator End) |
static bool | canUseCtorHoming (const CXXRecordDecl *RD) |
static bool | shouldOmitDefinition (llvm::codegenoptions::DebugInfoKind DebugKind, bool DebugTypeExtRefs, const RecordDecl *RD, const LangOptions &LangOpts) |
static bool | hasDefaultGetterName (const ObjCPropertyDecl *PD, const ObjCMethodDecl *Getter) |
static bool | hasDefaultSetterName (const ObjCPropertyDecl *PD, const ObjCMethodDecl *Setter) |
static QualType | UnwrapTypeForDebugInfo (QualType T, const ASTContext &C) |
static bool | ReferencesAnonymousEntity (ArrayRef< TemplateArgument > Args) |
static bool | ReferencesAnonymousEntity (RecordType *RT) |
static bool | IsReconstitutableType (QualType QT) |
◆ ABSTRACT_TYPE
| #define ABSTRACT_TYPE | ( | | Class, | | ------------------------- | - | | ------ | | | Base | | | | | ) | | | |
◆ AMDGPU_NAMED_BARRIER_TYPE
| #define AMDGPU_NAMED_BARRIER_TYPE | ( | | Name, | | --------------------------------------------------------------- | - | | ----- | | | Id, | | | | | | SingletonId, | | | | | | Width, | | | | | | Align, | | | | | | Scope | | | | | ) | | | |
Value:
case BuiltinType::Id: { \
if (!SingletonId) \
SingletonId = \
DBuilder.createBasicType(Name, Width, llvm::dwarf::DW_ATE_unsigned); \
return SingletonId; \
}
◆ AMDGPU_OPAQUE_PTR_TYPE
| #define AMDGPU_OPAQUE_PTR_TYPE | ( | | Name, | | --------------------------------------------------------------- | - | | ----- | | | Id, | | | | | | SingletonId, | | | | | | Width, | | | | | | Align, | | | | | | AS | | | | | ) | | | |
Value:
case BuiltinType::Id: { \
if (!SingletonId) \
SingletonId = \
DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type, Name, \
TheCU, TheCU->getFile(), 0); \
return SingletonId; \
}
◆ BUILTIN_TYPE
| #define BUILTIN_TYPE | ( | | Id, | | --------------------- | - | | ------------------------------------------------------------ | | | SingletonId | | | | | ) | | | |
◆ DEPENDENT_TYPE
| #define DEPENDENT_TYPE | ( | | Class, | | ------------------------- | ----------------- | | ------ | | | Base | | | | | ) | case Type::Class: | | |
◆ EXT_OPAQUE_TYPE
| #define EXT_OPAQUE_TYPE | ( | | ExtType, | | --------------------------------------------------------------- | - | | -------- | | | Id, | | | | | | Ext | | | | | ) | | | |
Value:
case BuiltinType::Id: \
return getOrCreateStructPtrType("opencl_" #ExtType, Id##Ty);
◆ HLSL_INTANGIBLE_TYPE
| #define HLSL_INTANGIBLE_TYPE | ( | | Name, | | --------------------------------------------------------------- | - | | ----- | | | Id, | | | | | | SingletonId | | | | | ) | | | |
Value:
case BuiltinType::Id: \
return getOrCreateStructPtrType(#Name, SingletonId);
◆ IMAGE_TYPE
| #define IMAGE_TYPE | ( | | ImgType, | | --------------------------------------------------------------- | - | | -------- | | | Id, | | | | | | SingletonId, | | | | | | Access, | | | | | | Suffix | | | | | ) | | | |
Value:
case BuiltinType::Id: \
return getOrCreateStructPtrType("opencl_" #ImgType "_" #Suffix "_t", \
SingletonId);
◆ NON_CANONICAL_TYPE
| #define NON_CANONICAL_TYPE | ( | | Class, | | ---------------------------- | - | | ------ | | | Base | | | | | ) | | | |
◆ PLACEHOLDER_TYPE
| #define PLACEHOLDER_TYPE | ( | | Id, | | ------------------------- | --------------------- | | ------------------------------------------------------------ | | | SingletonId | | | | | ) | case BuiltinType::Id: | | |
◆ PPC_VECTOR_TYPE
| #define PPC_VECTOR_TYPE | ( | | Name, | | --------------------------------------------------------------- | --------------------- | | ----- | | | Id, | | | | | | size | | | | | ) | case BuiltinType::Id: | | |
◆ RVV_TYPE
| #define RVV_TYPE | ( | | Name, | | --------------------------------------------------------------- | --------------------- | | ----- | | | Id, | | | | | | SingletonId | | | | | ) | case BuiltinType::Id: | | |
◆ SVE_TYPE
| #define SVE_TYPE | ( | | Name, | | --------------------------------------------------------------- | --------------------- | | ----- | | | Id, | | | | | | SingletonId | | | | | ) | case BuiltinType::Id: | | |
◆ TYPE
| #define TYPE | ( | | Class, | | ------------------------- | - | | ------ | | | Base | | | | | ) | | | |
◆ WASM_REF_TYPE
| #define WASM_REF_TYPE | ( | | Name, | | --------------------------------------------------------------- | - | | ----- | | | MangledName, | | | | | | Id, | | | | | | SingletonId, | | | | | | AS | | | | | ) | | | |
Value:
case BuiltinType::Id: { \
if (!SingletonId) \
SingletonId = \
DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type, \
MangledName, TheCU, TheCU->getFile(), 0); \
return SingletonId; \
}
◆ canUseCtorHoming()
◆ getAccessFlag()
◆ getDeclAlignIfRequired()
static uint32_t getDeclAlignIfRequired ( const Decl * D, const ASTContext & Ctx ) | static |
---|
◆ getDwarfCC()
Definition at line 1547 of file CGDebugInfo.cpp.
References clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::CC_AArch64SVEPCS, clang::CC_AArch64VectorCall, clang::CC_AMDGPUKernelCall, clang::CC_C, clang::CC_IntelOclBicc, clang::CC_M68kRTD, clang::CC_OpenCLKernel, clang::CC_PreserveAll, clang::CC_PreserveMost, clang::CC_PreserveNone, clang::CC_RISCVVectorCall, clang::CC_SpirFunction, clang::CC_Swift, clang::CC_SwiftAsync, clang::CC_Win64, clang::CC_X86_64SysV, clang::CC_X86FastCall, clang::CC_X86Pascal, clang::CC_X86RegCall, clang::CC_X86StdCall, clang::CC_X86ThisCall, and clang::CC_X86VectorCall.
◆ getNextQualifier()
static llvm::dwarf::Tag getNextQualifier ( Qualifiers & Q) | static |
---|
◆ getRefFlags()
◆ getTagForRecord()
static llvm::dwarf::Tag getTagForRecord ( const RecordDecl * RD) | static |
---|
◆ GetTemplateArgs()
◆ getTypeAlignIfRequired() [1/2]
static uint32_t getTypeAlignIfRequired ( const Type * Ty, const ASTContext & Ctx ) | static |
---|
◆ getTypeAlignIfRequired() [2/2]
◆ getTypeIdentifier()
◆ hasCXXMangling()
static bool hasCXXMangling ( const TagDecl * TD, llvm::DICompileUnit * TheCU ) | static |
---|
◆ hasDefaultGetterName()
◆ hasDefaultSetterName()
◆ hasExplicitMemberDefinition()
◆ IsArtificial()
◆ isClassOrMethodDLLImport()
◆ IsDecomposedVarDecl()
static bool IsDecomposedVarDecl ( VarDecl const * VD) | static |
---|
◆ isDefinedInClangModule()
Does a type definition exist in an imported clang module?
Definition at line 2682 of file CGDebugInfo.cpp.
References clang::Explicit, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::DeclContext::getEnclosingNamespaceContext(), clang::NamedDecl::getName(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::TagDecl::isCompleteDefinition(), clang::NamedDecl::isExternallyVisible(), clang::Decl::isFromASTFile(), clang::TSK_ExplicitInstantiationDeclaration, and clang::TSK_Undeclared.
Referenced by clang::CodeGen::CGDebugInfo::completeClassData(), and shouldOmitDefinition().
◆ isFunctionLocalClass()
◆ IsReconstitutableType()
◆ needsTypeIdentifier()
◆ ReferencesAnonymousEntity() [1/2]
◆ ReferencesAnonymousEntity() [2/2]
◆ shouldOmitDefinition()
static bool shouldOmitDefinition ( llvm::codegenoptions::DebugInfoKind DebugKind, bool DebugTypeExtRefs, const RecordDecl * RD, const LangOptions & LangOpts ) | static |
---|
Definition at line 2780 of file CGDebugInfo.cpp.
References canUseCtorHoming(), clang::ExternalASTSource::EK_Always, clang::Decl::getASTContext(), clang::RecordDecl::getDefinition(), clang::ASTContext::getExternalSource(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasDefinition(), hasExplicitMemberDefinition(), isClassOrMethodDLLImport(), clang::TagDecl::isCompleteDefinitionRequired(), isDefinedInClangModule(), clang::CXXRecordDecl::isDynamicClass(), clang::CXXRecordDecl::method_begin(), clang::CXXRecordDecl::method_end(), clang::TSK_ExplicitInstantiationDeclaration, and clang::TSK_Undeclared.
Referenced by clang::CodeGen::CGDebugInfo::completeRequiredType().
◆ stripUnusedQualifiers()
static void stripUnusedQualifiers ( Qualifiers & Q) | static |
---|