class CGDebugInfo

Declaration

class CGDebugInfo { /* full declaration omitted */ };

Description

This class gathers all debug information during compilation and is responsible for emitting to llvm globals or pass directly to the backend.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:55

Member Variables

private clang::CodeGen::CodeGenModule& CGM
private const codegenoptions::DebugInfoKind DebugKind
private bool DebugTypeExtRefs
private llvm::DIBuilder DBuilder
private llvm::DICompileUnit* TheCU = nullptr
private clang::ModuleMap* ClangModuleMap = nullptr
private clang::ASTSourceDescriptor PCHDescriptor
private clang::SourceLocation CurLoc
private llvm::MDNode* CurInlinedAt = nullptr
private llvm::DIType* VTablePtrType = nullptr
private llvm::DIType* ClassTy = nullptr
private llvm::DICompositeType* ObjTy = nullptr
private llvm::DIType* SelTy = nullptr
private llvm::DIType* OCLImage1dROTy = nullptr
private llvm::DIType* OCLImage1dArrayROTy = nullptr
private llvm::DIType* OCLImage1dBufferROTy = nullptr
private llvm::DIType* OCLImage2dROTy = nullptr
private llvm::DIType* OCLImage2dArrayROTy = nullptr
private llvm::DIType* OCLImage2dDepthROTy = nullptr
private llvm::DIType* OCLImage2dArrayDepthROTy = nullptr
private llvm::DIType* OCLImage2dMSAAROTy = nullptr
private llvm::DIType* OCLImage2dArrayMSAAROTy = nullptr
private llvm::DIType* OCLImage2dMSAADepthROTy = nullptr
private llvm::DIType* OCLImage2dArrayMSAADepthROTy = nullptr
private llvm::DIType* OCLImage3dROTy = nullptr
private llvm::DIType* OCLImage1dWOTy = nullptr
private llvm::DIType* OCLImage1dArrayWOTy = nullptr
private llvm::DIType* OCLImage1dBufferWOTy = nullptr
private llvm::DIType* OCLImage2dWOTy = nullptr
private llvm::DIType* OCLImage2dArrayWOTy = nullptr
private llvm::DIType* OCLImage2dDepthWOTy = nullptr
private llvm::DIType* OCLImage2dArrayDepthWOTy = nullptr
private llvm::DIType* OCLImage2dMSAAWOTy = nullptr
private llvm::DIType* OCLImage2dArrayMSAAWOTy = nullptr
private llvm::DIType* OCLImage2dMSAADepthWOTy = nullptr
private llvm::DIType* OCLImage2dArrayMSAADepthWOTy = nullptr
private llvm::DIType* OCLImage3dWOTy = nullptr
private llvm::DIType* OCLImage1dRWTy = nullptr
private llvm::DIType* OCLImage1dArrayRWTy = nullptr
private llvm::DIType* OCLImage1dBufferRWTy = nullptr
private llvm::DIType* OCLImage2dRWTy = nullptr
private llvm::DIType* OCLImage2dArrayRWTy = nullptr
private llvm::DIType* OCLImage2dDepthRWTy = nullptr
private llvm::DIType* OCLImage2dArrayDepthRWTy = nullptr
private llvm::DIType* OCLImage2dMSAARWTy = nullptr
private llvm::DIType* OCLImage2dArrayMSAARWTy = nullptr
private llvm::DIType* OCLImage2dMSAADepthRWTy = nullptr
private llvm::DIType* OCLImage2dArrayMSAADepthRWTy = nullptr
private llvm::DIType* OCLImage3dRWTy = nullptr
private llvm::DIType* OCLSamplerDITy = nullptr
private llvm::DIType* OCLEventDITy = nullptr
private llvm::DIType* OCLClkEventDITy = nullptr
private llvm::DIType* OCLQueueDITy = nullptr
private llvm::DIType* OCLNDRangeDITy = nullptr
private llvm::DIType* OCLReserveIDDITy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCMcePayloadTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCImePayloadTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCRefPayloadTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCSicPayloadTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCMceResultTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCImeResultTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCRefResultTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCSicResultTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCImeResultSingleRefStreamoutTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCImeResultDualRefStreamoutTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCImeSingleRefStreaminTy = nullptr
private llvm::DIType* OCLIntelSubgroupAVCImeDualRefStreaminTy = nullptr
private llvm::DenseMap<const void*, llvm::TrackingMDRef> TypeCache
Cache of previously constructed Types.
private std::map<llvm::StringRef, llvm::StringRef, std::greater<llvm::StringRef>> DebugPrefixMap
private llvm::SmallDenseMap<QualType, llvm::Metadata*> SizeExprCache
Cache that maps VLA types to size expressions for that type, represented by instantiated Metadata nodes.
private clang::CodeGen::CGDebugInfo::PrintingCallbacks PrintCB = {*this}
private llvm::SmallVector<ObjCInterfaceCacheEntry, 32> ObjCInterfaceCache
Cache of previously constructed interfaces which may change.
private llvm::DenseMap<const ObjCInterfaceDecl*, std::vector<llvm::PointerIntPair< llvm::DISubprogram*, 1>>> ObjCMethodCache
Cache of forward declarations for methods belonging to the interface. The extra bit on the DISubprogram specifies whether a method is "objc_direct".
private llvm::DenseMap<const Module*, llvm::TrackingMDRef> ModuleCache
Cache of references to clang modules and precompiled headers.
private std::vector<void*> RetainedTypes
List of interfaces we want to keep even if orphaned.
private std::vector<std::pair<const TagType*, llvm::TrackingMDRef>> ReplaceMap
Cache of forward declared types to RAUW at the end of compilation.
private std::vector<std::pair<const DeclaratorDecl*, llvm::TrackingMDRef>> FwdDeclReplaceMap
Cache of replaceable forward declarations (functions and variables) to RAUW at the end of compilation.
private std::vector< llvm::TypedTrackingMDRef<llvm::DIScope>> LexicalBlockStack
Keep track of our current nested lexical block.
private llvm::DenseMap<const Decl*, llvm::TrackingMDRef> RegionMap
private std::vector<unsigned int> FnBeginRegionCount
Keep track of LexicalBlockStack counter at the beginning of a function. This is used to pop unbalanced regions at the end of a function.
private llvm::BumpPtrAllocator DebugInfoNames
This is a storage for names that are constructed on demand. For example, C++ destructors, C++ operators etc..
private llvm::StringRef CWDName
private llvm::DenseMap<const char*, llvm::TrackingMDRef> DIFileCache
private llvm::DenseMap<const FunctionDecl*, llvm::TrackingMDRef> SPCache
private llvm::DenseMap<const Decl*, llvm::TrackingMDRef> DeclCache
Cache declarations relevant to DW_TAG_imported_declarations (C++ using declarations and global alias variables) that aren't covered by other more specific caches.
private llvm::DenseMap<const Decl*, llvm::TrackingMDRef> ImportedDeclCache
private llvm::DenseMap<const NamespaceDecl*, llvm::TrackingMDRef> NamespaceCache
private llvm::DenseMap<const NamespaceAliasDecl*, llvm::TrackingMDRef> NamespaceAliasCache
private llvm::DenseMap< const Decl*, llvm::TypedTrackingMDRef<llvm::DIDerivedType>> StaticDataMemberCache
private clang::CodeGen::CGDebugInfo::ParamDecl2StmtTy CoroutineParameterMappings
The key is coroutine real parameters, value is coroutine move parameters.
private clang::CodeGen::CGDebugInfo::Param2DILocTy ParamDbgMappings
The key is coroutine real parameters, value is DIVariable in LLVM IR.

Method Overview

  • public void AddStringLiteralDebugInfo(llvm::GlobalVariable * GV, const clang::StringLiteral * S)
  • private void AppendAddressSpaceXDeref(unsigned int AddressSpace, SmallVectorImpl<uint64_t> & Expr) const
  • public CGDebugInfo(clang::CodeGen::CodeGenModule & CGM)
  • private llvm::DIGlobalVariableExpression * CollectAnonRecordDecls(const clang::RecordDecl * RD, llvm::DIFile * Unit, unsigned int LineNo, llvm::StringRef LinkageName, llvm::GlobalVariable * Var, llvm::DIScope * DContext)
  • private llvm::DINodeArray CollectBTFDeclTagAnnotations(const clang::Decl * D)
  • private void CollectCXXBases(const clang::CXXRecordDecl * Decl, llvm::DIFile * F, SmallVectorImpl<llvm::Metadata *> & EltTys, llvm::DIType * RecordTy)
  • private void CollectCXXBasesAux(const clang::CXXRecordDecl * RD, llvm::DIFile * Unit, SmallVectorImpl<llvm::Metadata *> & EltTys, llvm::DIType * RecordTy, const CXXRecordDecl::base_class_const_range & Bases, llvm::DenseSet<CanonicalDeclPtr<const CXXRecordDecl>> & SeenTypes, llvm::DINode::DIFlags StartingFlags)
  • private void CollectCXXMemberFunctions(const clang::CXXRecordDecl * Decl, llvm::DIFile * F, SmallVectorImpl<llvm::Metadata *> & E, llvm::DIType * T)
  • private llvm::DINodeArray CollectCXXTemplateParams(const clang::RecordDecl * TS, llvm::DIFile * F)
  • private void CollectContainingType(const clang::CXXRecordDecl * RD, llvm::DICompositeType * CT)
  • private llvm::DINodeArray CollectFunctionTemplateParams(const clang::FunctionDecl * FD, llvm::DIFile * Unit)
  • private void CollectRecordFields(const clang::RecordDecl * Decl, llvm::DIFile * F, SmallVectorImpl<llvm::Metadata *> & E, llvm::DICompositeType * RecordTy)
  • private void CollectRecordLambdaFields(const clang::CXXRecordDecl * CXXDecl, SmallVectorImpl<llvm::Metadata *> & E, llvm::DIType * RecordTy)
  • private void CollectRecordNestedType(const clang::TypeDecl * RD, SmallVectorImpl<llvm::Metadata *> & E)
  • private void CollectRecordNormalField(const clang::FieldDecl * Field, uint64_t OffsetInBits, llvm::DIFile * F, SmallVectorImpl<llvm::Metadata *> & E, llvm::DIType * RecordTy, const clang::RecordDecl * RD)
  • private llvm::DINodeArray CollectTemplateParams(Optional<clang::CodeGen::CGDebugInfo::TemplateArgs> Args, llvm::DIFile * Unit)
  • private void CollectVTableInfo(const clang::CXXRecordDecl * Decl, llvm::DIFile * F, SmallVectorImpl<llvm::Metadata *> & EltTys)
  • private llvm::DINodeArray CollectVarTemplateParams(const clang::VarDecl * VD, llvm::DIFile * Unit)
  • private llvm::DISubprogram * CreateCXXMemberFunction(const clang::CXXMethodDecl * Method, llvm::DIFile * F, llvm::DIType * RecordTy)
  • private void CreateCompileUnit()
  • private llvm::DIType * CreateEnumType(const clang::EnumType * Ty)
  • private void CreateLexicalBlock(clang::SourceLocation Loc)
  • private llvm::DICompositeType * CreateLimitedType(const clang::RecordType * Ty)
  • public llvm::DIMacro * CreateMacro(llvm::DIMacroFile * Parent, unsigned int MType, clang::SourceLocation LineLoc, llvm::StringRef Name, llvm::StringRef Value)
  • private llvm::DIType * CreateMemberType(llvm::DIFile * Unit, clang::QualType FType, llvm::StringRef Name, uint64_t * Offset)
  • private llvm::DIType * CreatePointerLikeType(llvm::dwarf::Tag Tag, const clang::Type * Ty, clang::QualType PointeeTy, llvm::DIFile * F)
  • private llvm::DIType * CreateQualifiedType(const clang::FunctionProtoType * Ty, llvm::DIFile * Fg)
  • private llvm::DIType * CreateQualifiedType(clang::QualType Ty, llvm::DIFile * Fg)
  • private llvm::DIDerivedType * CreateRecordStaticField(const clang::VarDecl * Var, llvm::DIType * RecordTy, const clang::RecordDecl * RD)
  • private llvm::DIType * CreateSelfType(const clang::QualType & QualTy, llvm::DIType * Ty)
  • public llvm::DIMacroFile * CreateTempMacroFile(llvm::DIMacroFile * Parent, clang::SourceLocation LineLoc, clang::SourceLocation FileLoc)
  • private llvm::DIType * CreateType(const clang::BuiltinType * Ty)
  • private llvm::DIType * CreateType(const clang::ObjCObjectType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::ObjCObjectPointerType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::PointerType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::BlockPointerType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::FunctionType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::TemplateSpecializationType * Ty, llvm::DIFile * Fg)
  • private llvm::DIType * CreateType(const clang::TypedefType * Ty, llvm::DIFile * Fg)
  • private llvm::DIType * CreateType(const clang::RecordType * Tyg)
  • private llvm::DIType * CreateType(const clang::BitIntType * Ty)
  • private llvm::DIType * CreateType(const clang::ObjCInterfaceType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::ObjCTypeParamType * Ty, llvm::DIFile * Unit)
  • private llvm::DIType * CreateType(const clang::VectorType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::ConstantMatrixType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::ArrayType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::LValueReferenceType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::RValueReferenceType * Ty, llvm::DIFile * Unit)
  • private llvm::DIType * CreateType(const clang::MemberPointerType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::AtomicType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateType(const clang::AutoType * Ty)
  • private llvm::DIType * CreateType(const clang::ComplexType * Ty)
  • private llvm::DIType * CreateType(const clang::PipeType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateTypeDefinition(const clang::ObjCInterfaceType * Ty, llvm::DIFile * F)
  • private llvm::DIType * CreateTypeDefinition(const clang::RecordType * Ty)
  • private llvm::DIType * CreateTypeDefinition(const clang::EnumType * Ty)
  • private llvm::DIType * CreateTypeNode(clang::QualType Ty, llvm::DIFile * Fg)
  • public void EmitAndRetainType(clang::QualType Ty)
  • private llvm::DILocalVariable * EmitDeclare(const clang::VarDecl * decl, llvm::Value * AI, llvm::Optional<unsigned int> ArgNo, clang::CodeGen::CGBuilderTy & Builder, const bool UsePointerValue = false)
  • private llvm::DILocalVariable * EmitDeclare(const clang::BindingDecl * decl, llvm::Value * AI, llvm::Optional<unsigned int> ArgNo, clang::CodeGen::CGBuilderTy & Builder, const bool UsePointerValue = false)
  • public llvm::DILocalVariable * EmitDeclareOfArgVariable(const clang::VarDecl * Decl, llvm::Value * AI, unsigned int ArgNo, clang::CodeGen::CGBuilderTy & Builder)
  • public llvm::DILocalVariable * EmitDeclareOfAutoVariable(const clang::VarDecl * Decl, llvm::Value * AI, clang::CodeGen::CGBuilderTy & Builder, const bool UsePointerValue = false)
  • public void EmitDeclareOfBlockDeclRefVariable(const clang::VarDecl * variable, llvm::Value * storage, clang::CodeGen::CGBuilderTy & Builder, const clang::CodeGen::CGBlockInfo & blockInfo, llvm::Instruction * InsertPoint = nullptr)
  • public void EmitDeclareOfBlockLiteralArgVariable(const clang::CodeGen::CGBlockInfo & block, llvm::StringRef Name, unsigned int ArgNo, llvm::AllocaInst * LocalAddr, clang::CodeGen::CGBuilderTy & Builder)
  • public void EmitExplicitCastType(clang::QualType Ty)
  • public void EmitExternalVariable(llvm::GlobalVariable * GV, const clang::VarDecl * Decl)
  • public void EmitFuncDeclForCallSite(llvm::CallBase * CallOrInvoke, clang::QualType CalleeType, const clang::FunctionDecl * CalleeDecl)
  • public void EmitFunctionDecl(clang::GlobalDecl GD, clang::SourceLocation Loc, clang::QualType FnType, llvm::Function * Fn = nullptr)
  • public void EmitFunctionEnd(clang::CodeGen::CGBuilderTy & Builder, llvm::Function * Fn)
  • public void EmitGlobalAlias(const llvm::GlobalValue * GV, const clang::GlobalDecl Decl)
  • public void EmitGlobalVariable(llvm::GlobalVariable * GV, const clang::VarDecl * Decl)
  • public void EmitGlobalVariable(const clang::ValueDecl * VD, const clang::APValue & Init)
  • public void EmitImportDecl(const clang::ImportDecl & ID)
  • public void EmitInlineFunctionEnd(clang::CodeGen::CGBuilderTy & Builder)
  • public void EmitInlineFunctionStart(clang::CodeGen::CGBuilderTy & Builder, clang::GlobalDecl GD)
  • public void EmitLabel(const clang::LabelDecl * D, clang::CodeGen::CGBuilderTy & Builder)
  • public void EmitLexicalBlockEnd(clang::CodeGen::CGBuilderTy & Builder, clang::SourceLocation Loc)
  • public void EmitLexicalBlockStart(clang::CodeGen::CGBuilderTy & Builder, clang::SourceLocation Loc)
  • public void EmitLocation(clang::CodeGen::CGBuilderTy & Builder, clang::SourceLocation Loc)
  • public llvm::DIImportedEntity * EmitNamespaceAlias(const clang::NamespaceAliasDecl & NA)
  • private clang::CodeGen::CGDebugInfo::BlockByRefType EmitTypeForVarWithBlocksAttr(const clang::VarDecl * VD, uint64_t * OffSet)
  • public void EmitUsingDecl(const clang::UsingDecl & UD)
  • public void EmitUsingDirective(const clang::UsingDirectiveDecl & UD)
  • public void EmitUsingEnumDecl(const clang::UsingEnumDecl & UD)
  • public void EmitUsingShadowDecl(const clang::UsingShadowDecl & USD)
  • private std::string GetName(const clang::Decl *, bool Qualified = false) const
  • private Optional<clang::CodeGen::CGDebugInfo::TemplateArgs> GetTemplateArgs(const clang::VarDecl *) const
  • private Optional<clang::CodeGen::CGDebugInfo::TemplateArgs> GetTemplateArgs(const clang::RecordDecl *) const
  • private Optional<clang::CodeGen::CGDebugInfo::TemplateArgs> GetTemplateArgs(const clang::FunctionDecl *) const
  • public llvm::DebugLoc SourceLocToDebugLoc(clang::SourceLocation Loc)
  • public void addHeapAllocSiteMetadata(llvm::CallBase * CallSite, clang::QualType AllocatedTy, clang::SourceLocation Loc)
  • private uint64_t collectDefaultElementTypesForBlockPointer(const clang::BlockPointerType * Ty, llvm::DIFile * Unit, llvm::DIDerivedType * DescTy, unsigned int LineNo, SmallVectorImpl<llvm::Metadata *> & EltTys)
  • private void collectDefaultFieldsForBlockLiteralDeclare(const clang::CodeGen::CGBlockInfo & Block, const clang::ASTContext & Context, clang::SourceLocation Loc, const llvm::StructLayout & BlockLayout, llvm::DIFile * Unit, SmallVectorImpl<llvm::Metadata *> & Fields)
  • private void collectFunctionDeclProps(clang::GlobalDecl GD, llvm::DIFile * Unit, llvm::StringRef & Name, llvm::StringRef & LinkageName, llvm::DIScope *& FDContext, llvm::DINodeArray & TParamsArray, llvm::DINode::DIFlags & Flags)
  • private void collectVarDeclProps(const clang::VarDecl * VD, llvm::DIFile *& Unit, unsigned int & LineNo, clang::QualType & T, llvm::StringRef & Name, llvm::StringRef & LinkageName, llvm::MDTuple *& TemplateParameters, llvm::DIScope *& VDContext)
  • public void completeClass(const clang::RecordDecl * RD)
  • public void completeClassData(const clang::RecordDecl * RD)
  • public void completeRequiredType(const clang::RecordDecl * RD)
  • public void completeTemplateDefinition(const clang::ClassTemplateSpecializationDecl & SD)
  • public void completeType(const clang::RecordDecl * RD)
  • public void completeType(const clang::EnumDecl * ED)
  • public void completeUnusedClass(const clang::CXXRecordDecl & D)
  • private Optional<llvm::DIFile::ChecksumKind> computeChecksum(clang::FileID FID, SmallString<32> & Checksum) const
  • private llvm::DIType * createBitFieldType(const clang::FieldDecl * BitFieldDecl, llvm::DIScope * RecordTy, const clang::RecordDecl * RD)
  • private llvm::DIType * createFieldType(llvm::StringRef name, clang::QualType type, clang::SourceLocation loc, clang::AccessSpecifier AS, uint64_t offsetInBits, uint32_t AlignInBits, llvm::DIFile * tunit, llvm::DIScope * scope, const clang::RecordDecl * RD = nullptr, llvm::DINodeArray Annotations = nullptr)
  • private llvm::DIType * createFieldType(llvm::StringRef name, clang::QualType type, clang::SourceLocation loc, clang::AccessSpecifier AS, uint64_t offsetInBits, llvm::DIFile * tunit, llvm::DIScope * scope, const clang::RecordDecl * RD = nullptr)
  • private llvm::DIFile * createFile(llvm::StringRef FileName, Optional<llvm::DIFile::ChecksumInfo<StringRef>> CSInfo, Optional<llvm::StringRef> Source)
  • public void emitFunctionStart(clang::GlobalDecl GD, clang::SourceLocation Loc, clang::SourceLocation ScopeLoc, clang::QualType FnType, llvm::Function * Fn, bool CurFnIsThunk)
  • public void finalize()
  • private llvm::DINode::DIFlags getCallSiteRelatedAttrs() const
  • private llvm::StringRef getClassName(const clang::RecordDecl * RD)
  • private unsigned int getColumnNumber(clang::SourceLocation Loc, bool Force = false)
  • private llvm::DIScope * getContextDescriptor(const clang::Decl * Context, llvm::DIScope * Default)
  • public clang::CodeGen::CGDebugInfo::ParamDecl2StmtTy & getCoroutineParameterMappings()
  • private llvm::DIScope * getCurrentContextDescriptor(const clang::Decl * Decl)
  • private llvm::StringRef getCurrentDirname()
  • private llvm::DIScope * getDeclContextDescriptor(const clang::Decl * D)
  • private llvm::DINode * getDeclarationOrDefinition(const clang::Decl * D)
  • private llvm::StringRef getDynamicInitializerName(const clang::VarDecl * VD, clang::DynamicInitKind StubKind, llvm::Function * InitFn)
  • private llvm::DISubprogram * getFunctionDeclaration(const clang::Decl * D)
  • private llvm::DISubprogram * getFunctionForwardDeclaration(clang::GlobalDecl GD)
  • private llvm::DISubprogram * getFunctionFwdDeclOrStub(clang::GlobalDecl GD, bool Stub)
  • private llvm::StringRef getFunctionName(const clang::FunctionDecl * FD)
  • private llvm::DISubprogram * getFunctionStub(clang::GlobalDecl GD)
  • public clang::QualType getFunctionType(const clang::FunctionDecl * FD, clang::QualType RetTy, const SmallVectorImpl<const clang::VarDecl *> & Args)
  • private llvm::DIGlobalVariable * getGlobalVariableForwardDeclaration(const clang::VarDecl * VD)
  • public llvm::MDNode * getInlinedAt() const
  • private unsigned int getLineNumber(clang::SourceLocation Loc)
  • public clang::SourceLocation getLocation() const
  • private llvm::DISubprogram * getObjCMethodDeclaration(const clang::Decl * D, llvm::DISubroutineType * FnType, unsigned int LineNo, llvm::DINode::DIFlags Flags, llvm::DISubprogram::DISPFlags SPFlags)
  • private llvm::StringRef getObjCMethodName(const clang::ObjCMethodDecl * FD)
  • private llvm::DIFile * getOrCreateFile(clang::SourceLocation Loc)
  • private llvm::DISubroutineType * getOrCreateFunctionType(const clang::Decl * D, clang::QualType FnType, llvm::DIFile * F)
  • private llvm::DISubroutineType * getOrCreateInstanceMethodType(clang::QualType ThisPtr, const clang::FunctionProtoType * Func, llvm::DIFile * Unit, bool decl)
  • public llvm::DIType * getOrCreateInterfaceType(clang::QualType Ty, clang::SourceLocation Loc)
  • private llvm::DICompositeType * getOrCreateLimitedType(const clang::RecordType * Ty)
  • private llvm::DISubroutineType * getOrCreateMethodType(const clang::CXXMethodDecl * Method, llvm::DIFile * F, bool decl)
  • private llvm::DIModule * getOrCreateModuleRef(clang::ASTSourceDescriptor Mod, bool CreateSkeletonCU)
  • private llvm::DINamespace * getOrCreateNamespace(const clang::NamespaceDecl * N)
  • private llvm::DICompositeType * getOrCreateRecordFwdDecl(const clang::RecordType *, llvm::DIScope *)
  • public llvm::DIType * getOrCreateRecordType(clang::QualType Ty, clang::SourceLocation L)
  • public llvm::DIType * getOrCreateStandaloneType(clang::QualType Ty, clang::SourceLocation Loc)
  • private llvm::DIDerivedType * getOrCreateStaticDataMemberDeclarationOrNull(const clang::VarDecl * D)
  • private llvm::DIType * getOrCreateStructPtrType(llvm::StringRef Name, llvm::DIType *& Cache)
  • private llvm::DIType * getOrCreateType(clang::QualType Ty, llvm::DIFile * Fg)
  • private llvm::DIType * getOrCreateVTablePtrType(llvm::DIFile * F)
  • public clang::CodeGen::CGDebugInfo::Param2DILocTy & getParamDbgMappings()
  • private llvm::DIModule * getParentModuleOrNull(const clang::Decl * D)
  • private clang::PrintingPolicy getPrintingPolicy() const
  • private llvm::StringRef getSelectorName(clang::Selector S)
  • private Optional<llvm::StringRef> getSource(const clang::SourceManager & SM, clang::FileID FID)
  • private llvm::DIType * getTypeOrNull(const clang::QualType)
  • private llvm::StringRef getVTableName(const clang::CXXRecordDecl * Decl)
  • private llvm::StringRef internString(llvm::StringRef A, llvm::StringRef B = llvm::StringRef())
  • public void registerVLASizeExpression(clang::QualType Ty, llvm::Metadata * SizeExpr)
  • public std::string remapDIPath(llvm::StringRef) const
  • public void setDwoId(uint64_t Signature)
  • public void setInlinedAt(llvm::MDNode * InlinedAt)
  • public void setLocation(clang::SourceLocation Loc)
  • public void setModuleMap(clang::ModuleMap & MMap)
  • public void setPCHDescriptor(clang::ASTSourceDescriptor PCH)
  • public ~CGDebugInfo()

Methods

void AddStringLiteralDebugInfo(
    llvm::GlobalVariable* GV,
    const clang::StringLiteral* S)

Description

DebugInfo isn't attached to string literals by default. While certain aspects of debuginfo aren't useful for string literals (like a name), it's nice to be able to symbolize the line and column information. This is especially useful for sanitizers, as it allows symbolization of heap-buffer-overflows on constant strings.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:541

Parameters

llvm::GlobalVariable* GV
const clang::StringLiteral* S

void AppendAddressSpaceXDeref(
    unsigned int AddressSpace,
    SmallVectorImpl<uint64_t>& Expr) const

Description

If target-specific LLVM \p AddressSpace directly maps to target-specific DWARF address space, appends extended dereferencing mechanism to complex expression \p Expr. Otherwise, does nothing. Extended dereferencing mechanism is has the following format: DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef

Declared at: clang/lib/CodeGen/CGDebugInfo.h:361

Parameters

unsigned int AddressSpace
SmallVectorImpl<uint64_t>& Expr

CGDebugInfo(clang::CodeGen::CodeGenModule& CGM)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:381

Parameters

clang::CodeGen::CodeGenModule& CGM

llvm::DIGlobalVariableExpression*
CollectAnonRecordDecls(
    const clang::RecordDecl* RD,
    llvm::DIFile* Unit,
    unsigned int LineNo,
    llvm::StringRef LinkageName,
    llvm::GlobalVariable* Var,
    llvm::DIScope* DContext)

Description

Return a global variable that represents one of the collection of global variables created for an anonmyous union. Recursively collect all of the member fields of a global anonymous decl and create static variables for them. The first time this is called it needs to be on a union and then from there we can have additional unnamed fields.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:722

Parameters

const clang::RecordDecl* RD
llvm::DIFile* Unit
unsigned int LineNo
llvm::StringRef LinkageName
llvm::GlobalVariable* Var
llvm::DIScope* DContext

llvm::DINodeArray CollectBTFDeclTagAnnotations(
    const clang::Decl* D)

Description

A helper function to collect debug info for btf_decl_tag annotations.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:305

Parameters

const clang::Decl* D

void CollectCXXBases(
    const clang::CXXRecordDecl* Decl,
    llvm::DIFile* F,
    SmallVectorImpl<llvm::Metadata*>& EltTys,
    llvm::DIType* RecordTy)

Description

A helper function to collect debug info for C++ base classes. This is used while creating debug info entry for a Record.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:265

Parameters

const clang::CXXRecordDecl* Decl
llvm::DIFile* F
SmallVectorImpl<llvm::Metadata*>& EltTys
llvm::DIType* RecordTy

void CollectCXXBasesAux(
    const clang::CXXRecordDecl* RD,
    llvm::DIFile* Unit,
    SmallVectorImpl<llvm::Metadata*>& EltTys,
    llvm::DIType* RecordTy,
    const CXXRecordDecl::base_class_const_range&
        Bases,
    llvm::DenseSet<
        CanonicalDeclPtr<const CXXRecordDecl>>&
        SeenTypes,
    llvm::DINode::DIFlags StartingFlags)

Description

Helper function for CollectCXXBases. Adds debug info entries for types in Bases that are not in SeenTypes.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:271

Parameters

const clang::CXXRecordDecl* RD
llvm::DIFile* Unit
SmallVectorImpl<llvm::Metadata*>& EltTys
llvm::DIType* RecordTy
const CXXRecordDecl::base_class_const_range& Bases
llvm::DenseSet< CanonicalDeclPtr<const CXXRecordDecl>>& SeenTypes
llvm::DINode::DIFlags StartingFlags

void CollectCXXMemberFunctions(
    const clang::CXXRecordDecl* Decl,
    llvm::DIFile* F,
    SmallVectorImpl<llvm::Metadata*>& E,
    llvm::DIType* T)

Description

A helper function to collect debug info for C++ member functions. This is used while creating debug info entry for a Record.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:258

Parameters

const clang::CXXRecordDecl* Decl
llvm::DIFile* F
SmallVectorImpl<llvm::Metadata*>& E
llvm::DIType* T

llvm::DINodeArray CollectCXXTemplateParams(
    const clang::RecordDecl* TS,
    llvm::DIFile* F)

Description

A helper function to collect debug info for template parameters.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:301

Parameters

const clang::RecordDecl* TS
llvm::DIFile* F

void CollectContainingType(
    const clang::CXXRecordDecl* RD,
    llvm::DICompositeType* CT)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:196

Parameters

const clang::CXXRecordDecl* RD
llvm::DICompositeType* CT

llvm::DINodeArray CollectFunctionTemplateParams(
    const clang::FunctionDecl* FD,
    llvm::DIFile* Unit)

Description

A helper function to collect debug info for function template parameters.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:287

Parameters

const clang::FunctionDecl* FD
llvm::DIFile* Unit

void CollectRecordFields(
    const clang::RecordDecl* Decl,
    llvm::DIFile* F,
    SmallVectorImpl<llvm::Metadata*>& E,
    llvm::DICompositeType* RecordTy)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:342

Parameters

const clang::RecordDecl* Decl
llvm::DIFile* F
SmallVectorImpl<llvm::Metadata*>& E
llvm::DICompositeType* RecordTy

void CollectRecordLambdaFields(
    const clang::CXXRecordDecl* CXXDecl,
    SmallVectorImpl<llvm::Metadata*>& E,
    llvm::DIType* RecordTy)

Description

Helpers for collecting fields of a record. @ {

Declared at: clang/lib/CodeGen/CGDebugInfo.h:330

Parameters

const clang::CXXRecordDecl* CXXDecl
SmallVectorImpl<llvm::Metadata*>& E
llvm::DIType* RecordTy

void CollectRecordNestedType(
    const clang::TypeDecl* RD,
    SmallVectorImpl<llvm::Metadata*>& E)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:340

Parameters

const clang::TypeDecl* RD
SmallVectorImpl<llvm::Metadata*>& E

void CollectRecordNormalField(
    const clang::FieldDecl* Field,
    uint64_t OffsetInBits,
    llvm::DIFile* F,
    SmallVectorImpl<llvm::Metadata*>& E,
    llvm::DIType* RecordTy,
    const clang::RecordDecl* RD)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:336

Parameters

const clang::FieldDecl* Field
uint64_t OffsetInBits
llvm::DIFile* F
SmallVectorImpl<llvm::Metadata*>& E
llvm::DIType* RecordTy
const clang::RecordDecl* RD

llvm::DINodeArray CollectTemplateParams(
    Optional<
        clang::CodeGen::CGDebugInfo::TemplateArgs>
        Args,
    llvm::DIFile* Unit)

Description

A helper function to collect template parameters.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:283

Parameters

Optional< clang::CodeGen::CGDebugInfo::TemplateArgs> Args
llvm::DIFile* Unit

void CollectVTableInfo(
    const clang::CXXRecordDecl* Decl,
    llvm::DIFile* F,
    SmallVectorImpl<llvm::Metadata*>& EltTys)

Description

If the C++ class has vtable info then insert appropriate debug info entry in EltTys vector.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:348

Parameters

const clang::CXXRecordDecl* Decl
llvm::DIFile* F
SmallVectorImpl<llvm::Metadata*>& EltTys

llvm::DINodeArray CollectVarTemplateParams(
    const clang::VarDecl* VD,
    llvm::DIFile* Unit)

Description

A helper function to collect debug info for function template parameters.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:292

Parameters

const clang::VarDecl* VD
llvm::DIFile* Unit

llvm::DISubprogram* CreateCXXMemberFunction(
    const clang::CXXMethodDecl* Method,
    llvm::DIFile* F,
    llvm::DIType* RecordTy)

Description

A helper function to create a subprogram for a single member function GlobalDecl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:251

Parameters

const clang::CXXMethodDecl* Method
llvm::DIFile* F
llvm::DIType* RecordTy

void CreateCompileUnit()

Description

Create new compile unit.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:631

llvm::DIType* CreateEnumType(
    const clang::EnumType* Ty)

Description

Get enumeration type.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:215

Parameters

const clang::EnumType* Ty

void CreateLexicalBlock(clang::SourceLocation Loc)

Description

Create a new lexical block node and push it on the stack.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:353

Parameters

clang::SourceLocation Loc

llvm::DICompositeType* CreateLimitedType(
    const clang::RecordType* Ty)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:195

Parameters

const clang::RecordType* Ty

llvm::DIMacro* CreateMacro(
    llvm::DIMacroFile* Parent,
    unsigned int MType,
    clang::SourceLocation LineLoc,
    llvm::StringRef Name,
    llvm::StringRef Value)

Description

Create debug info for a macro defined by a #define directive or a macro undefined by a #undef directive.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:571

Parameters

llvm::DIMacroFile* Parent
unsigned int MType
clang::SourceLocation LineLoc
llvm::StringRef Name
llvm::StringRef Value

llvm::DIType* CreateMemberType(
    llvm::DIFile* Unit,
    clang::QualType FType,
    llvm::StringRef Name,
    uint64_t* Offset)

Description

Create new member and increase Offset by FType's size.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:669

Parameters

llvm::DIFile* Unit
clang::QualType FType
llvm::StringRef Name
uint64_t* Offset

llvm::DIType* CreatePointerLikeType(
    llvm::dwarf::Tag Tag,
    const clang::Type* Ty,
    clang::QualType PointeeTy,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:245

Parameters

llvm::dwarf::Tag Tag
const clang::Type* Ty
clang::QualType PointeeTy
llvm::DIFile* F

llvm::DIType* CreateQualifiedType(
    const clang::FunctionProtoType* Ty,
    llvm::DIFile* Fg)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:183

Parameters

const clang::FunctionProtoType* Ty
llvm::DIFile* Fg

llvm::DIType* CreateQualifiedType(
    clang::QualType Ty,
    llvm::DIFile* Fg)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:182

Parameters

clang::QualType Ty
llvm::DIFile* Fg

llvm::DIDerivedType* CreateRecordStaticField(
    const clang::VarDecl* Var,
    llvm::DIType* RecordTy,
    const clang::RecordDecl* RD)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:333

Parameters

const clang::VarDecl* Var
llvm::DIType* RecordTy
const clang::RecordDecl* RD

llvm::DIType* CreateSelfType(
    const clang::QualType& QualTy,
    llvm::DIType* Ty)

Description

Look up the completed type for a self pointer in the TypeCache and create a copy of it with the ObjectPointer and Artificial flags set. If the type is not cached, a new one is created. This should never happen though, since creating a type for the implicit self argument implies that we already parsed the interface definition and the ivar declarations in the implementation.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:223

Parameters

const clang::QualType& QualTy
llvm::DIType* Ty

llvm::DIMacroFile* CreateTempMacroFile(
    llvm::DIMacroFile* Parent,
    clang::SourceLocation LineLoc,
    clang::SourceLocation FileLoc)

Description

Create debug info for a file referenced by an #include directive.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:576

Parameters

llvm::DIMacroFile* Parent
clang::SourceLocation LineLoc
clang::SourceLocation FileLoc

llvm::DIType* CreateType(
    const clang::BuiltinType* Ty)

Description

Helper functions for getOrCreateType. @ { Currently the checksum of an interface includes the number of ivars and property accessors.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:178

Parameters

const clang::BuiltinType* Ty

llvm::DIType* CreateType(
    const clang::ObjCObjectType* Ty,
    llvm::DIFile* F)

Description

Get Objective-C object type.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:203

Parameters

const clang::ObjCObjectType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::ObjCObjectPointerType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:188

Parameters

const clang::ObjCObjectPointerType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::PointerType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:189

Parameters

const clang::PointerType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::BlockPointerType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:190

Parameters

const clang::BlockPointerType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::FunctionType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:191

Parameters

const clang::FunctionType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::TemplateSpecializationType* Ty,
    llvm::DIFile* Fg)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:186

Parameters

const clang::TemplateSpecializationType* Ty
llvm::DIFile* Fg

llvm::DIType* CreateType(
    const clang::TypedefType* Ty,
    llvm::DIFile* Fg)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:185

Parameters

const clang::TypedefType* Ty
llvm::DIFile* Fg

llvm::DIType* CreateType(
    const clang::RecordType* Tyg)

Description

Get structure or union type.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:193

Parameters

const clang::RecordType* Tyg

llvm::DIType* CreateType(
    const clang::BitIntType* Ty)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:181

Parameters

const clang::BitIntType* Ty

llvm::DIType* CreateType(
    const clang::ObjCInterfaceType* Ty,
    llvm::DIFile* F)

Description

Get Objective-C interface type.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:199

Parameters

const clang::ObjCInterfaceType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::ObjCTypeParamType* Ty,
    llvm::DIFile* Unit)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:204

Parameters

const clang::ObjCTypeParamType* Ty
llvm::DIFile* Unit

llvm::DIType* CreateType(
    const clang::VectorType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:206

Parameters

const clang::VectorType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::ConstantMatrixType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:207

Parameters

const clang::ConstantMatrixType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::ArrayType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:208

Parameters

const clang::ArrayType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::LValueReferenceType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:209

Parameters

const clang::LValueReferenceType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::RValueReferenceType* Ty,
    llvm::DIFile* Unit)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:210

Parameters

const clang::RValueReferenceType* Ty
llvm::DIFile* Unit

llvm::DIType* CreateType(
    const clang::MemberPointerType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:211

Parameters

const clang::MemberPointerType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::AtomicType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:212

Parameters

const clang::AtomicType* Ty
llvm::DIFile* F

llvm::DIType* CreateType(
    const clang::AutoType* Ty)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:180

Parameters

const clang::AutoType* Ty

llvm::DIType* CreateType(
    const clang::ComplexType* Ty)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:179

Parameters

const clang::ComplexType* Ty

llvm::DIType* CreateType(
    const clang::PipeType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:213

Parameters

const clang::PipeType* Ty
llvm::DIFile* F

llvm::DIType* CreateTypeDefinition(
    const clang::ObjCInterfaceType* Ty,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:200

Parameters

const clang::ObjCInterfaceType* Ty
llvm::DIFile* F

llvm::DIType* CreateTypeDefinition(
    const clang::RecordType* Ty)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:194

Parameters

const clang::RecordType* Ty

llvm::DIType* CreateTypeDefinition(
    const clang::EnumType* Ty)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:216

Parameters

const clang::EnumType* Ty

llvm::DIType* CreateTypeNode(clang::QualType Ty,
                             llvm::DIFile* Fg)

Description

Create type metadata for a source language type.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:666

Parameters

clang::QualType Ty
llvm::DIFile* Fg

void EmitAndRetainType(clang::QualType Ty)

Description

Emit the type even if it might not be used.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:522

Parameters

clang::QualType Ty

llvm::DILocalVariable* EmitDeclare(
    const clang::VarDecl* decl,
    llvm::Value* AI,
    llvm::Optional<unsigned int> ArgNo,
    clang::CodeGen::CGBuilderTy& Builder,
    const bool UsePointerValue = false)

Description

Emit call to llvm.dbg.declare for a variable declaration. Returns a pointer to the DILocalVariable associated with the llvm.dbg.declare, or nullptr otherwise.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:589

Parameters

const clang::VarDecl* decl
llvm::Value* AI
llvm::Optional<unsigned int> ArgNo
clang::CodeGen::CGBuilderTy& Builder
const bool UsePointerValue = false

llvm::DILocalVariable* EmitDeclare(
    const clang::BindingDecl* decl,
    llvm::Value* AI,
    llvm::Optional<unsigned int> ArgNo,
    clang::CodeGen::CGBuilderTy& Builder,
    const bool UsePointerValue = false)

Description

Emit call to llvm.dbg.declare for a binding declaration. Returns a pointer to the DILocalVariable associated with the llvm.dbg.declare, or nullptr otherwise.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:597

Parameters

const clang::BindingDecl* decl
llvm::Value* AI
llvm::Optional<unsigned int> ArgNo
clang::CodeGen::CGBuilderTy& Builder
const bool UsePointerValue = false

llvm::DILocalVariable* EmitDeclareOfArgVariable(
    const clang::VarDecl* Decl,
    llvm::Value* AI,
    unsigned int ArgNo,
    clang::CodeGen::CGBuilderTy& Builder)

Description

Emit call to \c llvm.dbg.declare for an argument variable declaration.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:491

Parameters

const clang::VarDecl* Decl
llvm::Value* AI
unsigned int ArgNo
clang::CodeGen::CGBuilderTy& Builder

llvm::DILocalVariable* EmitDeclareOfAutoVariable(
    const clang::VarDecl* Decl,
    llvm::Value* AI,
    clang::CodeGen::CGBuilderTy& Builder,
    const bool UsePointerValue = false)

Description

Emit call to \c llvm.dbg.declare for an automatic variable declaration. Returns a pointer to the DILocalVariable associated with the llvm.dbg.declare, or nullptr otherwise.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:476

Parameters

const clang::VarDecl* Decl
llvm::Value* AI
clang::CodeGen::CGBuilderTy& Builder
const bool UsePointerValue = false

void EmitDeclareOfBlockDeclRefVariable(
    const clang::VarDecl* variable,
    llvm::Value* storage,
    clang::CodeGen::CGBuilderTy& Builder,
    const clang::CodeGen::CGBlockInfo& blockInfo,
    llvm::Instruction* InsertPoint = nullptr)

Description

Emit call to \c llvm.dbg.declare for an imported variable declaration in a block.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:485

Parameters

const clang::VarDecl* variable
llvm::Value* storage
clang::CodeGen::CGBuilderTy& Builder
const clang::CodeGen::CGBlockInfo& blockInfo
llvm::Instruction* InsertPoint = nullptr

void EmitDeclareOfBlockLiteralArgVariable(
    const clang::CodeGen::CGBlockInfo& block,
    llvm::StringRef Name,
    unsigned int ArgNo,
    llvm::AllocaInst* LocalAddr,
    clang::CodeGen::CGBuilderTy& Builder)

Description

Emit call to \c llvm.dbg.declare for the block-literal argument to a block invocation function.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:498

Parameters

const clang::CodeGen::CGBlockInfo& block
llvm::StringRef Name
unsigned int ArgNo
llvm::AllocaInst* LocalAddr
clang::CodeGen::CGBuilderTy& Builder

void EmitExplicitCastType(clang::QualType Ty)

Description

Emit the type explicitly casted to.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:519

Parameters

clang::QualType Ty

void EmitExternalVariable(
    llvm::GlobalVariable* GV,
    const clang::VarDecl* Decl)

Description

Emit information about an external variable.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:510

Parameters

llvm::GlobalVariable* GV
const clang::VarDecl* Decl

void EmitFuncDeclForCallSite(
    llvm::CallBase* CallOrInvoke,
    clang::QualType CalleeType,
    const clang::FunctionDecl* CalleeDecl)

Description

Emit debug info for an extern function being called. This is needed for call site debug info.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:456

Parameters

llvm::CallBase* CallOrInvoke
clang::QualType CalleeType
const clang::FunctionDecl* CalleeDecl

void EmitFunctionDecl(
    clang::GlobalDecl GD,
    clang::SourceLocation Loc,
    clang::QualType FnType,
    llvm::Function* Fn = nullptr)

Description

Emit debug info for a function declaration.\p Fn is set only when a declaration for a debug call site gets created.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:451

Parameters

clang::GlobalDecl GD
clang::SourceLocation Loc
clang::QualType FnType
llvm::Function* Fn = nullptr

void EmitFunctionEnd(
    clang::CodeGen::CGBuilderTy& Builder,
    llvm::Function* Fn)

Description

Constructs the debug code for exiting a function.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:461

Parameters

clang::CodeGen::CGBuilderTy& Builder
llvm::Function* Fn

void EmitGlobalAlias(const llvm::GlobalValue* GV,
                     const clang::GlobalDecl Decl)

Description

Emit information about global variable alias.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:513

Parameters

const llvm::GlobalValue* GV
const clang::GlobalDecl Decl

void EmitGlobalVariable(
    llvm::GlobalVariable* GV,
    const clang::VarDecl* Decl)

Description

Emit information about a global variable.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:504

Parameters

llvm::GlobalVariable* GV
const clang::VarDecl* Decl

void EmitGlobalVariable(
    const clang::ValueDecl* VD,
    const clang::APValue& Init)

Description

Emit a constant global variable's debug info.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:507

Parameters

const clang::ValueDecl* VD
const clang::APValue& Init

void EmitImportDecl(const clang::ImportDecl& ID)

Description

Emit an @importdeclaration.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:534

Parameters

const clang::ImportDecl& ID

void EmitInlineFunctionEnd(
    clang::CodeGen::CGBuilderTy& Builder)

Description

End an inlined function scope.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:447

Parameters

clang::CodeGen::CGBuilderTy& Builder

void EmitInlineFunctionStart(
    clang::CodeGen::CGBuilderTy& Builder,
    clang::GlobalDecl GD)

Description

Start a new scope for an inlined function.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:445

Parameters

clang::CodeGen::CGBuilderTy& Builder
clang::GlobalDecl GD

void EmitLabel(
    const clang::LabelDecl* D,
    clang::CodeGen::CGBuilderTy& Builder)

Description

Emit call to \c llvm.dbg.label for an label.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:481

Parameters

const clang::LabelDecl* D
clang::CodeGen::CGBuilderTy& Builder

void EmitLexicalBlockEnd(
    clang::CodeGen::CGBuilderTy& Builder,
    clang::SourceLocation Loc)

Description

Emit metadata to indicate the end of a new lexical block and pop the current block.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:469

Parameters

clang::CodeGen::CGBuilderTy& Builder
clang::SourceLocation Loc

void EmitLexicalBlockStart(
    clang::CodeGen::CGBuilderTy& Builder,
    clang::SourceLocation Loc)

Description

Emit metadata to indicate the beginning of a new lexical block and push the block onto the stack.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:465

Parameters

clang::CodeGen::CGBuilderTy& Builder
clang::SourceLocation Loc

void EmitLocation(
    clang::CodeGen::CGBuilderTy& Builder,
    clang::SourceLocation Loc)

Description

Emit metadata to indicate a change in line/column information in the source file. If the location is invalid, the previous location will be reused.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:431

Parameters

clang::CodeGen::CGBuilderTy& Builder
clang::SourceLocation Loc

llvm::DIImportedEntity* EmitNamespaceAlias(
    const clang::NamespaceAliasDecl& NA)

Description

Emit C++ namespace alias.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:545

Parameters

const clang::NamespaceAliasDecl& NA

clang::CodeGen::CGDebugInfo::BlockByRefType
EmitTypeForVarWithBlocksAttr(
    const clang::VarDecl* VD,
    uint64_t* OffSet)

Description

Build up structure info for the byref. See \a BuildByRefType.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:612

Parameters

const clang::VarDecl* VD
uint64_t* OffSet

void EmitUsingDecl(const clang::UsingDecl& UD)

Description

Emit C++ using declaration.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:528

Parameters

const clang::UsingDecl& UD

void EmitUsingDirective(
    const clang::UsingDirectiveDecl& UD)

Description

Emit C++ using directive.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:516

Parameters

const clang::UsingDirectiveDecl& UD

void EmitUsingEnumDecl(
    const clang::UsingEnumDecl& UD)

Description

Emit C++ using-enum declaration.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:531

Parameters

const clang::UsingEnumDecl& UD

void EmitUsingShadowDecl(
    const clang::UsingShadowDecl& USD)

Description

Emit a shadow decl brought in by a using or using-enum

Declared at: clang/lib/CodeGen/CGDebugInfo.h:525

Parameters

const clang::UsingShadowDecl& USD

std::string GetName(const clang::Decl*,
                    bool Qualified = false) const

Declared at: clang/lib/CodeGen/CGDebugInfo.h:609

Parameters

const clang::Decl*
bool Qualified = false

Optional<
    clang::CodeGen::CGDebugInfo::TemplateArgs>
GetTemplateArgs(const clang::VarDecl*) const

Declared at: clang/lib/CodeGen/CGDebugInfo.h:295

Parameters

const clang::VarDecl*

Optional<
    clang::CodeGen::CGDebugInfo::TemplateArgs>
GetTemplateArgs(const clang::RecordDecl*) const

Declared at: clang/lib/CodeGen/CGDebugInfo.h:296

Parameters

const clang::RecordDecl*

Optional<
    clang::CodeGen::CGDebugInfo::TemplateArgs>
GetTemplateArgs(const clang::FunctionDecl*) const

Declared at: clang/lib/CodeGen/CGDebugInfo.h:297

Parameters

const clang::FunctionDecl*

llvm::DebugLoc SourceLocToDebugLoc(
    clang::SourceLocation Loc)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:426

Parameters

clang::SourceLocation Loc

void addHeapAllocSiteMetadata(
    llvm::CallBase* CallSite,
    clang::QualType AllocatedTy,
    clang::SourceLocation Loc)

Description

Add heapallocsite metadata for MSAllocator calls.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:557

Parameters

llvm::CallBase* CallSite
clang::QualType AllocatedTy
clang::SourceLocation Loc

uint64_t
collectDefaultElementTypesForBlockPointer(
    const clang::BlockPointerType* Ty,
    llvm::DIFile* Unit,
    llvm::DIDerivedType* DescTy,
    unsigned int LineNo,
    SmallVectorImpl<llvm::Metadata*>& EltTys)

Description

A helper function to collect debug info for the default elements of a block.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:368

Parameters

const clang::BlockPointerType* Ty
llvm::DIFile* Unit
llvm::DIDerivedType* DescTy
unsigned int LineNo
SmallVectorImpl<llvm::Metadata*>& EltTys

Returns

The next available field offset after the default elements.

void collectDefaultFieldsForBlockLiteralDeclare(
    const clang::CodeGen::CGBlockInfo& Block,
    const clang::ASTContext& Context,
    clang::SourceLocation Loc,
    const llvm::StructLayout& BlockLayout,
    llvm::DIFile* Unit,
    SmallVectorImpl<llvm::Metadata*>& Fields)

Description

A helper function to collect debug info for the default fields of a block.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:375

Parameters

const clang::CodeGen::CGBlockInfo& Block
const clang::ASTContext& Context
clang::SourceLocation Loc
const llvm::StructLayout& BlockLayout
llvm::DIFile* Unit
SmallVectorImpl<llvm::Metadata*>& Fields

void collectFunctionDeclProps(
    clang::GlobalDecl GD,
    llvm::DIFile* Unit,
    llvm::StringRef& Name,
    llvm::StringRef& LinkageName,
    llvm::DIScope*& FDContext,
    llvm::DINodeArray& TParamsArray,
    llvm::DINode::DIFlags& Flags)

Description

Collect various properties of a FunctionDecl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:770

Parameters

clang::GlobalDecl GD
A GlobalDecl whose getDecl() must return a FunctionDecl.
llvm::DIFile* Unit
llvm::StringRef& Name
llvm::StringRef& LinkageName
llvm::DIScope*& FDContext
llvm::DINodeArray& TParamsArray
llvm::DINode::DIFlags& Flags

void collectVarDeclProps(
    const clang::VarDecl* VD,
    llvm::DIFile*& Unit,
    unsigned int& LineNo,
    clang::QualType& T,
    llvm::StringRef& Name,
    llvm::StringRef& LinkageName,
    llvm::MDTuple*& TemplateParameters,
    llvm::DIScope*& VDContext)

Description

Collect various properties of a VarDecl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:777

Parameters

const clang::VarDecl* VD
llvm::DIFile*& Unit
unsigned int& LineNo
clang::QualType& T
llvm::StringRef& Name
llvm::StringRef& LinkageName
llvm::MDTuple*& TemplateParameters
llvm::DIScope*& VDContext

void completeClass(const clang::RecordDecl* RD)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:564

Parameters

const clang::RecordDecl* RD

void completeClassData(
    const clang::RecordDecl* RD)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:563

Parameters

const clang::RecordDecl* RD

void completeRequiredType(
    const clang::RecordDecl* RD)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:562

Parameters

const clang::RecordDecl* RD

void completeTemplateDefinition(
    const clang::ClassTemplateSpecializationDecl&
        SD)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:566

Parameters

const clang::ClassTemplateSpecializationDecl& SD

void completeType(const clang::RecordDecl* RD)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:561

Parameters

const clang::RecordDecl* RD

void completeType(const clang::EnumDecl* ED)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:560

Parameters

const clang::EnumDecl* ED

void completeUnusedClass(
    const clang::CXXRecordDecl& D)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:567

Parameters

const clang::CXXRecordDecl& D

Optional<llvm::DIFile::ChecksumKind>
computeChecksum(clang::FileID FID,
                SmallString<32>& Checksum) const

Description

Compute the file checksum debug info for input file ID.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:635

Parameters

clang::FileID FID
SmallString<32>& Checksum

llvm::DIType* createBitFieldType(
    const clang::FieldDecl* BitFieldDecl,
    llvm::DIScope* RecordTy,
    const clang::RecordDecl* RD)

Description

Create new bit field member.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:324

Parameters

const clang::FieldDecl* BitFieldDecl
llvm::DIScope* RecordTy
const clang::RecordDecl* RD

llvm::DIType* createFieldType(
    llvm::StringRef name,
    clang::QualType type,
    clang::SourceLocation loc,
    clang::AccessSpecifier AS,
    uint64_t offsetInBits,
    uint32_t AlignInBits,
    llvm::DIFile* tunit,
    llvm::DIScope* scope,
    const clang::RecordDecl* RD = nullptr,
    llvm::DINodeArray Annotations = nullptr)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:307

Parameters

llvm::StringRef name
clang::QualType type
clang::SourceLocation loc
clang::AccessSpecifier AS
uint64_t offsetInBits
uint32_t AlignInBits
llvm::DIFile* tunit
llvm::DIScope* scope
const clang::RecordDecl* RD = nullptr
llvm::DINodeArray Annotations = nullptr

llvm::DIType* createFieldType(
    llvm::StringRef name,
    clang::QualType type,
    clang::SourceLocation loc,
    clang::AccessSpecifier AS,
    uint64_t offsetInBits,
    llvm::DIFile* tunit,
    llvm::DIScope* scope,
    const clang::RecordDecl* RD = nullptr)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:314

Parameters

llvm::StringRef name
clang::QualType type
clang::SourceLocation loc
clang::AccessSpecifier AS
uint64_t offsetInBits
llvm::DIFile* tunit
llvm::DIScope* scope
const clang::RecordDecl* RD = nullptr

llvm::DIFile* createFile(
    llvm::StringRef FileName,
    Optional<
        llvm::DIFile::ChecksumInfo<StringRef>>
        CSInfo,
    Optional<llvm::StringRef> Source)

Description

Create a file debug info descriptor for a source file.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:646

Parameters

llvm::StringRef FileName
Optional<llvm::DIFile::ChecksumInfo<StringRef>> CSInfo
Optional<llvm::StringRef> Source

void emitFunctionStart(
    clang::GlobalDecl GD,
    clang::SourceLocation Loc,
    clang::SourceLocation ScopeLoc,
    clang::QualType FnType,
    llvm::Function* Fn,
    bool CurFnIsThunk)

Description

Emit a call to llvm.dbg.function.start to indicate start of a new function.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:440

Parameters

clang::GlobalDecl GD
clang::SourceLocation Loc
The location of the function header.
clang::SourceLocation ScopeLoc
The location of the function body.
clang::QualType FnType
llvm::Function* Fn
bool CurFnIsThunk

void finalize()

Declared at: clang/lib/CodeGen/CGDebugInfo.h:384

llvm::DINode::DIFlags getCallSiteRelatedAttrs()
    const

Description

Return flags which enable debug info emission for call sites, provided that it is supported and enabled.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:729

llvm::StringRef getClassName(
    const clang::RecordDecl* RD)

Description

Get class name including template argument list.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:748

Parameters

const clang::RecordDecl* RD

unsigned int getColumnNumber(
    clang::SourceLocation Loc,
    bool Force = false)

Description

Get column number for the location. If location is invalid then use current location.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:766

Parameters

clang::SourceLocation Loc
bool Force = false
Assume DebugColumnInfo option is true.

llvm::DIScope* getContextDescriptor(
    const clang::Decl* Context,
    llvm::DIScope* Default)

Description

Get context info for a given DeclContext \p Decl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:618

Parameters

const clang::Decl* Context
llvm::DIScope* Default

clang::CodeGen::CGDebugInfo::ParamDecl2StmtTy&
getCoroutineParameterMappings()

Declared at: clang/lib/CodeGen/CGDebugInfo.h:581

llvm::DIScope* getCurrentContextDescriptor(
    const clang::Decl* Decl)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:621

Parameters

const clang::Decl* Decl

llvm::StringRef getCurrentDirname()

Description

Return current directory name.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:628

llvm::DIScope* getDeclContextDescriptor(
    const clang::Decl* D)

Description

Get context info for the DeclContext of \p Decl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:616

Parameters

const clang::Decl* D

llvm::DINode* getDeclarationOrDefinition(
    const clang::Decl* D)

Description

Retrieve the DIDescriptor, if any, for the canonical form of this declaration.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:674

Parameters

const clang::Decl* D

llvm::StringRef getDynamicInitializerName(
    const clang::VarDecl* VD,
    clang::DynamicInitKind StubKind,
    llvm::Function* InitFn)

Description

Get the name to use in the debug info for a dynamic initializer or atexit stub function.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:755

Parameters

const clang::VarDecl* VD
clang::DynamicInitKind StubKind
llvm::Function* InitFn

llvm::DISubprogram* getFunctionDeclaration(
    const clang::Decl* D)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:678

Parameters

const clang::Decl* D

Returns

debug info descriptor to describe method declaration for the given method definition.

llvm::DISubprogram* getFunctionForwardDeclaration(
    clang::GlobalDecl GD)

Description

Create a subprogram describing the forward declaration represented in the given FunctionDecl wrapped in a GlobalDecl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:703

Parameters

clang::GlobalDecl GD

llvm::DISubprogram* getFunctionFwdDeclOrStub(
    clang::GlobalDecl GD,
    bool Stub)

Description

Helper that either creates a forward declaration or a stub.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:699

Parameters

clang::GlobalDecl GD
bool Stub

llvm::StringRef getFunctionName(
    const clang::FunctionDecl* FD)

Description

Get function name for the given FunctionDecl. If the name is constructed on demand (e.g., C++ destructor) then the name is stored on the side.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:737

Parameters

const clang::FunctionDecl* FD

llvm::DISubprogram* getFunctionStub(
    clang::GlobalDecl GD)

Description

Create a DISubprogram describing the function represented in the given FunctionDecl wrapped in a GlobalDecl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:707

Parameters

clang::GlobalDecl GD

clang::QualType getFunctionType(
    const clang::FunctionDecl* FD,
    clang::QualType RetTy,
    const SmallVectorImpl<const clang::VarDecl*>&
        Args)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:433

Parameters

const clang::FunctionDecl* FD
clang::QualType RetTy
const SmallVectorImpl<const clang::VarDecl*>& Args

llvm::DIGlobalVariable*
getGlobalVariableForwardDeclaration(
    const clang::VarDecl* VD)

Description

Create a global variable describing the forward declaration represented in the given VarDecl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:712

Parameters

const clang::VarDecl* VD

llvm::MDNode* getInlinedAt() const

Declared at: clang/lib/CodeGen/CGDebugInfo.h:423

Returns

the current inline scope.

unsigned int getLineNumber(
    clang::SourceLocation Loc)

Description

Get line number for the location. If location is invalid then use current location.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:761

Parameters

clang::SourceLocation Loc

clang::SourceLocation getLocation() const

Description

Return the current source location. This does not necessarily correspond to the IRBuilder's current DebugLoc.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:416

llvm::DISubprogram* getObjCMethodDeclaration(
    const clang::Decl* D,
    llvm::DISubroutineType* FnType,
    unsigned int LineNo,
    llvm::DINode::DIFlags Flags,
    llvm::DISubprogram::DISPFlags SPFlags)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:687

Parameters

const clang::Decl* D
llvm::DISubroutineType* FnType
For Objective-C methods, their type.
unsigned int LineNo
The declaration's line number.
llvm::DINode::DIFlags Flags
The DIFlags for the method declaration.
llvm::DISubprogram::DISPFlags SPFlags
The subprogram-spcific flags for the method declaration.

Returns

debug info descriptor to the describe method declaration for the given method definition.

llvm::StringRef getObjCMethodName(
    const clang::ObjCMethodDecl* FD)

Description

Returns the unmangled name of an Objective-C method. This is the display name for the debugging info.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:741

Parameters

const clang::ObjCMethodDecl* FD

llvm::DIFile* getOrCreateFile(
    clang::SourceLocation Loc)

Description

Convenience function to get the file debug info descriptor for the input location.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:642

Parameters

clang::SourceLocation Loc

llvm::DISubroutineType* getOrCreateFunctionType(
    const clang::Decl* D,
    clang::QualType FnType,
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:239

Parameters

const clang::Decl* D
clang::QualType FnType
llvm::DIFile* F

llvm::DISubroutineType*
getOrCreateInstanceMethodType(
    clang::QualType ThisPtr,
    const clang::FunctionProtoType* Func,
    llvm::DIFile* Unit,
    bool decl)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:236

Parameters

clang::QualType ThisPtr
const clang::FunctionProtoType* Func
llvm::DIFile* Unit
bool decl

llvm::DIType* getOrCreateInterfaceType(
    clang::QualType Ty,
    clang::SourceLocation Loc)

Description

Emit an Objective-C interface type standalone debug info.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:551

Parameters

clang::QualType Ty
clang::SourceLocation Loc

llvm::DICompositeType* getOrCreateLimitedType(
    const clang::RecordType* Ty)

Description

Get the type from the cache or create a new partial type if necessary.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:663

Parameters

const clang::RecordType* Ty

llvm::DISubroutineType* getOrCreateMethodType(
    const clang::CXXMethodDecl* Method,
    llvm::DIFile* F,
    bool decl)

Description

Return the debug type for a C++ method.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:233

Parameters

const clang::CXXMethodDecl* Method
llvm::DIFile* F
bool decl

llvm::DIModule* getOrCreateModuleRef(
    clang::ASTSourceDescriptor Mod,
    bool CreateSkeletonCU)

Description

Get a reference to a clang module. If \p CreateSkeletonCU is true, this also creates a split dwarf skeleton compile unit.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:655

Parameters

clang::ASTSourceDescriptor Mod
bool CreateSkeletonCU

llvm::DINamespace* getOrCreateNamespace(
    const clang::NamespaceDecl* N)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:244

Parameters

const clang::NamespaceDecl* N

Returns

namespace descriptor for the given namespace decl.

llvm::DICompositeType* getOrCreateRecordFwdDecl(
    const clang::RecordType*,
    llvm::DIScope*)

Description

Create a forward decl for a RecordType in a given context.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:624

Parameters

const clang::RecordType*
llvm::DIScope*

llvm::DIType* getOrCreateRecordType(
    clang::QualType Ty,
    clang::SourceLocation L)

Description

Emit record type's standalone debug info.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:548

Parameters

clang::QualType Ty
clang::SourceLocation L

llvm::DIType* getOrCreateStandaloneType(
    clang::QualType Ty,
    clang::SourceLocation Loc)

Description

Emit standalone debug info for a type.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:554

Parameters

clang::QualType Ty
clang::SourceLocation Loc

llvm::DIDerivedType*
getOrCreateStaticDataMemberDeclarationOrNull(
    const clang::VarDecl* D)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:696

Parameters

const clang::VarDecl* D

Returns

debug info descriptor to describe in-class static data member declaration for the given out-of-class definition. If D is an out-of-class definition of a static data member of a class, find its corresponding in-class declaration.

llvm::DIType* getOrCreateStructPtrType(
    llvm::StringRef Name,
    llvm::DIType*& Cache)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:247

Parameters

llvm::StringRef Name
llvm::DIType*& Cache

llvm::DIType* getOrCreateType(clang::QualType Ty,
                              llvm::DIFile* Fg)

Description

Get the type from the cache or create a new type if necessary.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:651

Parameters

clang::QualType Ty
llvm::DIFile* Fg

llvm::DIType* getOrCreateVTablePtrType(
    llvm::DIFile* F)

Declared at: clang/lib/CodeGen/CGDebugInfo.h:241

Parameters

llvm::DIFile* F

Returns

debug info descriptor for vtable.

clang::CodeGen::CGDebugInfo::Param2DILocTy&
getParamDbgMappings()

Declared at: clang/lib/CodeGen/CGDebugInfo.h:580

llvm::DIModule* getParentModuleOrNull(
    const clang::Decl* D)

Description

DebugTypeExtRefs: If \p D originated in a clang module, return it.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:659

Parameters

const clang::Decl* D

clang::PrintingPolicy getPrintingPolicy() const

Description

Get the printing policy for producing names for debug info.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:732

llvm::StringRef getSelectorName(clang::Selector S)

Description

Return selector name. This is used for debugging info.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:745

Parameters

clang::Selector S

Optional<llvm::StringRef> getSource(
    const clang::SourceManager& SM,
    clang::FileID FID)

Description

Get the source of the given file ID.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:638

Parameters

const clang::SourceManager& SM
clang::FileID FID

llvm::DIType* getTypeOrNull(const clang::QualType)

Description

Get the type from the cache or return null type if it doesn't exist.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:228

Parameters

const clang::QualType

llvm::StringRef getVTableName(
    const clang::CXXRecordDecl* Decl)

Description

Get the vtable name for the given class.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:751

Parameters

const clang::CXXRecordDecl* Decl

llvm::StringRef internString(
    llvm::StringRef A,
    llvm::StringRef B = llvm::StringRef())

Description

Allocate a copy of \p A using the DebugInfoNames allocator and return a reference to it. If multiple arguments are given the strings are concatenated.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:786

Parameters

llvm::StringRef A
llvm::StringRef B = llvm::StringRef()

void registerVLASizeExpression(
    clang::QualType Ty,
    llvm::Metadata* SizeExpr)

Description

Register VLA size expression debug node with the qualified type.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:390

Parameters

clang::QualType Ty
llvm::Metadata* SizeExpr

std::string remapDIPath(llvm::StringRef) const

Description

Remap a given path with the current debug prefix map

Declared at: clang/lib/CodeGen/CGDebugInfo.h:387

Parameters

llvm::StringRef

void setDwoId(uint64_t Signature)

Description

Module debugging: Support for building PCMs. @ { Set the main CU's DwoId field to \p Signature.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:397

Parameters

uint64_t Signature

void setInlinedAt(llvm::MDNode* InlinedAt)

Description

Update the current inline scope. All subsequent calls to \p EmitLocation will create a location with this inlinedAt field.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:420

Parameters

llvm::MDNode* InlinedAt

void setLocation(clang::SourceLocation Loc)

Description

Update the current source location. If

Declared at: clang/lib/CodeGen/CGDebugInfo.h:412

Parameters

clang::SourceLocation Loc

void setModuleMap(clang::ModuleMap& MMap)

Description

When generating debug information for a clang module or precompiled header, this module map will be used to determine the module of origin of each Decl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:402

Parameters

clang::ModuleMap& MMap

void setPCHDescriptor(
    clang::ASTSourceDescriptor PCH)

Description

When generating debug information for a clang module or precompiled header, this module map will be used to determine the module of origin of each Decl.

Declared at: clang/lib/CodeGen/CGDebugInfo.h:407

Parameters

clang::ASTSourceDescriptor PCH

~CGDebugInfo()

Declared at: clang/lib/CodeGen/CGDebugInfo.h:382