13#ifndef LLVM_CLANG_LIB_CODEGEN_CGDEBUGINFO_H
14#define LLVM_CLANG_LIB_CODEGEN_CGDEBUGINFO_H
27#include "llvm/ADT/DenseMap.h"
28#include "llvm/ADT/DenseSet.h"
29#include "llvm/IR/DIBuilder.h"
30#include "llvm/IR/DebugInfo.h"
31#include "llvm/IR/ValueHandle.h"
32#include "llvm/Support/Allocator.h"
42class ClassTemplateSpecializationDecl;
46class ObjCInterfaceDecl;
65 const llvm::codegenoptions::DebugInfoKind DebugKind;
66 bool DebugTypeExtRefs;
67 llvm::DIBuilder DBuilder;
68 llvm::DICompileUnit *TheCU =
nullptr;
72 llvm::MDNode *CurInlinedAt =
nullptr;
73 llvm::DIType *VTablePtrType =
nullptr;
74 llvm::DIType *ClassTy =
nullptr;
75 llvm::DICompositeType *ObjTy =
nullptr;
76 llvm::DIType *SelTy =
nullptr;
77#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
78 llvm::DIType *SingletonId = nullptr;
79#include "clang/Basic/OpenCLImageTypes.def"
80 llvm::DIType *OCLSamplerDITy =
nullptr;
81 llvm::DIType *OCLEventDITy =
nullptr;
82 llvm::DIType *OCLClkEventDITy =
nullptr;
83 llvm::DIType *OCLQueueDITy =
nullptr;
84 llvm::DIType *OCLNDRangeDITy =
nullptr;
85 llvm::DIType *OCLReserveIDDITy =
nullptr;
86#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
87 llvm::DIType *Id##Ty = nullptr;
88#include "clang/Basic/OpenCLExtensionTypes.def"
89#define WASM_TYPE(Name, Id, SingletonId) llvm::DIType *SingletonId = nullptr;
90#include "clang/Basic/WebAssemblyReferenceTypes.def"
91#define AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) \
92 llvm::DIType *SingletonId = nullptr;
93#include "clang/Basic/AMDGPUTypes.def"
94#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
95 llvm::DIType *SingletonId = nullptr;
96#include "clang/Basic/HLSLIntangibleTypes.def"
99 llvm::DenseMap<const void *, llvm::TrackingMDRef> TypeCache;
103 llvm::SmallDenseMap<QualType, llvm::Metadata *> SizeExprCache;
107 const CGDebugInfo &Self;
110 PrintingCallbacks(
const CGDebugInfo &Self) : Self(Self) {}
111 std::string remapPath(StringRef
Path)
const override {
112 return Self.remapDIPath(
Path);
115 PrintingCallbacks PrintCB = {*
this};
117 struct ObjCInterfaceCacheEntry {
118 const ObjCInterfaceType *
Type;
121 ObjCInterfaceCacheEntry(
const ObjCInterfaceType *Type, llvm::DIType *Decl,
132 llvm::DenseMap<
const ObjCInterfaceDecl *,
133 std::vector<llvm::PointerIntPair<llvm::DISubprogram *, 1>>>
137 llvm::DenseMap<const Module *, llvm::TrackingMDRef> ModuleCache;
140 std::vector<void *> RetainedTypes;
143 std::vector<std::pair<const TagType *, llvm::TrackingMDRef>> ReplaceMap;
147 std::vector<std::pair<const DeclaratorDecl *, llvm::TrackingMDRef>>
151 std::vector<llvm::TypedTrackingMDRef<llvm::DIScope>> LexicalBlockStack;
152 llvm::DenseMap<const Decl *, llvm::TrackingMDRef> RegionMap;
156 std::vector<unsigned> FnBeginRegionCount;
160 llvm::BumpPtrAllocator DebugInfoNames;
162 llvm::DenseMap<const char *, llvm::TrackingMDRef> DIFileCache;
163 llvm::DenseMap<const FunctionDecl *, llvm::TrackingMDRef> SPCache;
167 llvm::DenseMap<const Decl *, llvm::TrackingMDRef> DeclCache;
168 llvm::DenseMap<const Decl *, llvm::TrackingMDRef> ImportedDeclCache;
169 llvm::DenseMap<const NamespaceDecl *, llvm::TrackingMDRef> NamespaceCache;
170 llvm::DenseMap<const NamespaceAliasDecl *, llvm::TrackingMDRef>
172 llvm::DenseMap<const Decl *, llvm::TypedTrackingMDRef<llvm::DIDerivedType>>
173 StaticDataMemberCache;
175 using ParamDecl2StmtTy = llvm::DenseMap<const ParmVarDecl *, const Stmt *>;
176 using Param2DILocTy =
177 llvm::DenseMap<const ParmVarDecl *, llvm::DILocalVariable *>;
180 ParamDecl2StmtTy CoroutineParameterMappings;
182 Param2DILocTy ParamDbgMappings;
191 } KeyInstructionsInfo;
200 llvm::DIType *CreateType(
const BitIntType *Ty);
201 llvm::DIType *CreateQualifiedType(
QualType Ty, llvm::DIFile *Fg);
204 llvm::DIType *CreateType(
const TypedefType *Ty, llvm::DIFile *Fg);
208 llvm::DIType *CreateType(
const PointerType *Ty, llvm::DIFile *F);
210 llvm::DIType *CreateType(
const FunctionType *Ty, llvm::DIFile *F);
215 llvm::DIType *CreateType(
const RecordType *Tyg);
223 std::pair<llvm::DIType *, llvm::DIType *>
225 llvm::DICompositeType *CreateLimitedType(
const RecordType *Ty);
227 llvm::DICompositeType *CT);
233 llvm::DIType *CreateType(
const ObjCObjectType *Ty, llvm::DIFile *F);
236 llvm::DIType *CreateType(
const VectorType *Ty, llvm::DIFile *F);
238 llvm::DIType *CreateType(
const ArrayType *Ty, llvm::DIFile *F);
242 llvm::DIType *CreateType(
const AtomicType *Ty, llvm::DIFile *F);
243 llvm::DIType *CreateType(
const PipeType *Ty, llvm::DIFile *F);
245 llvm::DIType *CreateEnumType(
const EnumType *Ty);
246 llvm::DIType *CreateTypeDefinition(
const EnumType *Ty);
253 llvm::DIType *CreateSelfType(
const QualType &QualTy, llvm::DIType *Ty);
258 llvm::DIType *getTypeOrNull(
const QualType);
266 llvm::DISubroutineType *
270 llvm::DISubroutineType *
272 llvm::DIFile *Unit,
bool SkipFirst =
false);
273 llvm::DISubroutineType *
274 getOrCreateFunctionType(
const Decl *
D,
QualType FnType, llvm::DIFile *F);
276 llvm::DIType *getOrCreateVTablePtrType(llvm::DIFile *F);
279 llvm::DINamespace *getOrCreateNamespace(
const NamespaceDecl *N);
280 llvm::DIType *CreatePointerLikeType(llvm::dwarf::Tag Tag,
const Type *Ty,
281 QualType PointeeTy, llvm::DIFile *F);
282 llvm::DIType *getOrCreateStructPtrType(StringRef Name, llvm::DIType *&
Cache);
288 llvm::DIType *RecordTy);
302 llvm::DIType *RecordTy);
306 void CollectCXXBasesAux(
311 llvm::DINode::DIFlags StartingFlags);
319 struct TemplateArgs {
324 llvm::DINodeArray CollectTemplateParams(std::optional<TemplateArgs> Args,
328 llvm::DINodeArray CollectFunctionTemplateParams(
const FunctionDecl *FD,
333 llvm::DINodeArray CollectVarTemplateParams(
const VarDecl *VD,
336 std::optional<TemplateArgs> GetTemplateArgs(
const VarDecl *)
const;
337 std::optional<TemplateArgs> GetTemplateArgs(
const RecordDecl *)
const;
338 std::optional<TemplateArgs> GetTemplateArgs(
const FunctionDecl *)
const;
342 llvm::DINodeArray CollectCXXTemplateParams(
const RecordDecl *TS,
346 llvm::DINodeArray CollectBTFDeclTagAnnotations(
const Decl *
D);
348 llvm::DIType *createFieldType(StringRef name,
QualType type,
350 uint64_t offsetInBits, uint32_t AlignInBits,
351 llvm::DIFile *tunit, llvm::DIScope *scope,
353 llvm::DINodeArray Annotations =
nullptr);
355 llvm::DIType *createFieldType(StringRef name,
QualType type,
357 uint64_t offsetInBits, llvm::DIFile *tunit,
358 llvm::DIScope *scope,
360 return createFieldType(name,
type, loc, AS, offsetInBits, 0, tunit, scope,
365 llvm::DIDerivedType *createBitFieldType(
const FieldDecl *BitFieldDecl,
366 llvm::DIScope *RecordTy,
367 const RecordDecl *RD);
371 llvm::DIDerivedType *createBitFieldSeparatorIfNeeded(
372 const FieldDecl *BitFieldDecl,
const llvm::DIDerivedType *BitFieldDI,
376 llvm::StringMap<llvm::DISubprogram *> InlinedSubprogramMap;
380 llvm::DISubprogram *createInlinedSubprogram(StringRef FuncName,
381 llvm::DIFile *FileScope);
385 void CollectRecordLambdaFields(
const CXXRecordDecl *CXXDecl,
386 SmallVectorImpl<llvm::Metadata *> &
E,
387 llvm::DIType *RecordTy);
388 llvm::DIDerivedType *CreateRecordStaticField(
const VarDecl *Var,
389 llvm::DIType *RecordTy,
390 const RecordDecl *RD);
391 void CollectRecordNormalField(
const FieldDecl *Field, uint64_t OffsetInBits,
393 SmallVectorImpl<llvm::Metadata *> &
E,
394 llvm::DIType *RecordTy,
const RecordDecl *RD);
395 void CollectRecordNestedType(
const TypeDecl *RD,
396 SmallVectorImpl<llvm::Metadata *> &
E);
397 void CollectRecordFields(
const RecordDecl *
Decl, llvm::DIFile *F,
398 SmallVectorImpl<llvm::Metadata *> &
E,
399 llvm::DICompositeType *RecordTy);
403 void CollectVTableInfo(
const CXXRecordDecl *
Decl, llvm::DIFile *F,
404 SmallVectorImpl<llvm::Metadata *> &EltTys);
408 void CreateLexicalBlock(SourceLocation
Loc);
416 void AppendAddressSpaceXDeref(
unsigned AddressSpace,
417 SmallVectorImpl<uint64_t> &Expr)
const;
423 uint64_t collectDefaultElementTypesForBlockPointer(
424 const BlockPointerType *Ty, llvm::DIFile *Unit,
425 llvm::DIDerivedType *DescTy,
unsigned LineNo,
426 SmallVectorImpl<llvm::Metadata *> &EltTys);
430 void collectDefaultFieldsForBlockLiteralDeclare(
431 const CGBlockInfo &
Block,
const ASTContext &Context, SourceLocation
Loc,
432 const llvm::StructLayout &BlockLayout, llvm::DIFile *Unit,
433 SmallVectorImpl<llvm::Metadata *> &Fields);
436 CGDebugInfo(CodeGenModule &CGM);
446 SizeExprCache[Ty] = SizeExpr;
475 void setInlinedAt(llvm::MDNode *InlinedAt) { CurInlinedAt = InlinedAt; }
497 llvm::Function *Fn,
bool CurFnIsThunk);
507 QualType FnType, llvm::Function *Fn =
nullptr);
530 llvm::DILocalVariable *
533 const bool UsePointerValue =
false);
542 const CGBlockInfo &blockInfo, llvm::Instruction *InsertPoint =
nullptr);
546 llvm::DILocalVariable *
548 CGBuilderTy &Builder,
bool UsePointerValue =
false);
553 StringRef Name,
unsigned ArgNo,
554 llvm::AllocaInst *LocalAddr,
642 return CoroutineParameterMappings;
655 StringRef FailureMsg);
670 llvm::Value *Backup);
675 llvm::Value *Backup, uint64_t Atom);
685 void addInstSourceAtomMetadata(llvm::Instruction *I, uint64_t Group,
691 llvm::DILocalVariable *EmitDeclare(
const VarDecl *
decl, llvm::Value *AI,
692 std::optional<unsigned> ArgNo,
694 const bool UsePointerValue =
false);
699 llvm::DILocalVariable *EmitDeclare(
const BindingDecl *
decl, llvm::Value *AI,
700 std::optional<unsigned> ArgNo,
702 const bool UsePointerValue =
false);
704 struct BlockByRefType {
706 llvm::DIType *BlockByRefWrapper;
708 llvm::DIType *WrappedType;
712 std::string GetName(
const Decl *,
bool Qualified =
false)
const;
715 BlockByRefType EmitTypeForVarWithBlocksAttr(
const VarDecl *VD,
719 llvm::DIScope *getDeclContextDescriptor(
const Decl *
D);
721 llvm::DIScope *getContextDescriptor(
const Decl *Context,
724 llvm::DIScope *getCurrentContextDescriptor(
const Decl *
Decl);
727 llvm::DICompositeType *getOrCreateRecordFwdDecl(
const RecordType *,
731 StringRef getCurrentDirname();
734 void CreateCompileUnit();
737 std::optional<llvm::DIFile::ChecksumKind>
750 std::optional<llvm::DIFile::ChecksumInfo<StringRef>> CSInfo,
751 std::optional<StringRef> Source);
754 llvm::DIType *getOrCreateType(
QualType Ty, llvm::DIFile *Fg);
759 bool CreateSkeletonCU);
762 llvm::DIModule *getParentModuleOrNull(
const Decl *
D);
766 llvm::DICompositeType *getOrCreateLimitedType(
const RecordType *Ty);
769 llvm::DIType *CreateTypeNode(
QualType Ty, llvm::DIFile *Fg);
772 llvm::DIType *CreateMemberType(llvm::DIFile *Unit,
QualType FType,
773 StringRef Name, uint64_t *Offset);
777 llvm::DINode *getDeclarationOrDefinition(
const Decl *
D);
781 llvm::DISubprogram *getFunctionDeclaration(
const Decl *
D);
790 getObjCMethodDeclaration(
const Decl *
D, llvm::DISubroutineType *FnType,
791 unsigned LineNo, llvm::DINode::DIFlags Flags,
792 llvm::DISubprogram::DISPFlags SPFlags);
798 llvm::DIDerivedType *
799 getOrCreateStaticDataMemberDeclarationOrNull(
const VarDecl *
D);
802 llvm::DISubprogram *getFunctionFwdDeclOrStub(
GlobalDecl GD,
bool Stub);
806 llvm::DISubprogram *getFunctionForwardDeclaration(
GlobalDecl GD);
810 llvm::DISubprogram *getFunctionStub(
GlobalDecl GD);
814 llvm::DIGlobalVariable *
815 getGlobalVariableForwardDeclaration(
const VarDecl *VD);
824 llvm::DIGlobalVariableExpression *
825 CollectAnonRecordDecls(
const RecordDecl *RD, llvm::DIFile *Unit,
826 unsigned LineNo, StringRef LinkageName,
827 llvm::GlobalVariable *Var, llvm::DIScope *DContext);
832 llvm::DINode::DIFlags getCallSiteRelatedAttrs()
const;
848 StringRef getSelectorName(
Selector S);
858 StringRef getDynamicInitializerName(
const VarDecl *VD,
860 llvm::Function *InitFn);
873 void collectFunctionDeclProps(
GlobalDecl GD, llvm::DIFile *Unit,
874 StringRef &Name, StringRef &LinkageName,
875 llvm::DIScope *&FDContext,
876 llvm::DINodeArray &TParamsArray,
877 llvm::DINode::DIFlags &Flags);
880 void collectVarDeclProps(
const VarDecl *VD, llvm::DIFile *&Unit,
881 unsigned &LineNo,
QualType &
T, StringRef &Name,
882 StringRef &LinkageName,
883 llvm::MDTuple *&TemplateParameters,
884 llvm::DIScope *&VDContext);
888 llvm::DIExpression *createConstantValueExpression(
const clang::ValueDecl *VD,
894 StringRef internString(StringRef A, StringRef B = StringRef()) {
895 char *
Data = DebugInfoNames.Allocate<
char>(A.size() + B.size());
897 std::memcpy(
Data, A.data(), A.size());
899 std::memcpy(
Data + A.size(), B.data(), B.size());
900 return StringRef(
Data, A.size() + B.size());
908 void init(
SourceLocation TemporaryLocation,
bool DefaultToEmpty =
false);
912 llvm::DebugLoc OriginalLocation;
926 if (
this != &
Other) {
Defines the clang::ASTSourceDescriptor class, which abstracts clang modules and precompiled header fi...
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the clang::SourceLocation class and associated facilities.
Allows QualTypes to be sorted and hence used in maps and sets.
C Language Family Type Representation.
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Abstracts clang modules and precompiled header files and holds everything needed to generate debug in...
Represents an array type, per C99 6.7.5.2 - Array Declarators.
A binding in a decomposition declaration.
A fixed int type of a specified bitwidth.
This class is used for builtin types like 'int'.
Represents a static or instance method of a struct/union/class.
Represents a C++ struct/union/class.
llvm::iterator_range< base_class_const_iterator > base_class_const_range
A wrapper class around a pointer that always points to its canonical declaration.
Represents a class template specialization, which refers to a class template with a given set of temp...
A scoped helper to set the current source atom group for CGDebugInfo::addInstToCurrentSourceAtom.
A scoped helper to set the current debug location to the specified location or preferred location of ...
static ApplyDebugLocation CreateArtificial(CodeGenFunction &CGF)
Apply TemporaryLocation if it is valid.
static ApplyDebugLocation CreateDefaultArtificial(CodeGenFunction &CGF, SourceLocation TemporaryLocation)
Apply TemporaryLocation if it is valid.
ApplyDebugLocation(ApplyDebugLocation &&Other)
static ApplyDebugLocation CreateEmpty(CodeGenFunction &CGF)
Set the IRBuilder to not attach debug locations.
ApplyDebugLocation & operator=(ApplyDebugLocation &&Other)
A scoped helper to set the current debug location to an inlined location.
ApplyInlineDebugLocation & operator=(ApplyInlineDebugLocation &)=delete
ApplyInlineDebugLocation(const ApplyInlineDebugLocation &)=delete
~ApplyInlineDebugLocation()
Restore everything back to the original state.
CGBlockInfo - Information to generate a block literal.
This class gathers all debug information during compilation and is responsible for emitting to llvm g...
llvm::MDNode * getInlinedAt() const
void addInstToCurrentSourceAtom(llvm::Instruction *KeyInstruction, llvm::Value *Backup)
Add KeyInstruction and an optional Backup instruction to the current atom group, created using ApplyA...
llvm::DIType * getOrCreateStandaloneType(QualType Ty, SourceLocation Loc)
Emit standalone debug info for a type.
void EmitLocation(CGBuilderTy &Builder, SourceLocation Loc)
Emit metadata to indicate a change in line/column information in the source file.
void completeFunction()
Reset internal state.
void EmitGlobalAlias(const llvm::GlobalValue *GV, const GlobalDecl Decl)
Emit information about global variable alias.
void EmitLabel(const LabelDecl *D, CGBuilderTy &Builder)
Emit call to llvm.dbg.label for an label.
void EmitGlobalVariable(llvm::GlobalVariable *GV, const VarDecl *Decl)
Emit information about a global variable.
void setInlinedAt(llvm::MDNode *InlinedAt)
Update the current inline scope.
void completeUnusedClass(const CXXRecordDecl &D)
SourceLocation getLocation() const
Return the current source location.
llvm::DILocation * CreateSyntheticInlineAt(llvm::DebugLoc Location, StringRef FuncName)
Create a debug location from Location that adds an artificial inline frame where the frame name is Fu...
void EmitUsingShadowDecl(const UsingShadowDecl &USD)
Emit a shadow decl brought in by a using or using-enum.
void EmitUsingEnumDecl(const UsingEnumDecl &UD)
Emit C++ using-enum declaration.
void EmitFunctionEnd(CGBuilderTy &Builder, llvm::Function *Fn)
Constructs the debug code for exiting a function.
void EmitFuncDeclForCallSite(llvm::CallBase *CallOrInvoke, QualType CalleeType, const FunctionDecl *CalleeDecl)
Emit debug info for an extern function being called.
void EmitUsingDecl(const UsingDecl &UD)
Emit C++ using declaration.
llvm::DIMacroFile * CreateTempMacroFile(llvm::DIMacroFile *Parent, SourceLocation LineLoc, SourceLocation FileLoc)
Create debug info for a file referenced by an #include directive.
void completeTemplateDefinition(const ClassTemplateSpecializationDecl &SD)
void EmitExternalVariable(llvm::GlobalVariable *GV, const VarDecl *Decl)
Emit information about an external variable.
Param2DILocTy & getParamDbgMappings()
void emitFunctionStart(GlobalDecl GD, SourceLocation Loc, SourceLocation ScopeLoc, QualType FnType, llvm::Function *Fn, bool CurFnIsThunk)
Emit a call to llvm.dbg.function.start to indicate start of a new function.
llvm::DILocalVariable * EmitDeclareOfArgVariable(const VarDecl *Decl, llvm::Value *AI, unsigned ArgNo, CGBuilderTy &Builder, bool UsePointerValue=false)
Emit call to llvm.dbg.declare for an argument variable declaration.
void emitVTableSymbol(llvm::GlobalVariable *VTable, const CXXRecordDecl *RD)
Emit symbol for debugger that holds the pointer to the vtable.
void EmitLexicalBlockEnd(CGBuilderTy &Builder, SourceLocation Loc)
Emit metadata to indicate the end of a new lexical block and pop the current block.
void EmitUsingDirective(const UsingDirectiveDecl &UD)
Emit C++ using directive.
void addInstToSpecificSourceAtom(llvm::Instruction *KeyInstruction, llvm::Value *Backup, uint64_t Atom)
Add KeyInstruction and an optional Backup instruction to the atom group Atom.
void completeRequiredType(const RecordDecl *RD)
void EmitAndRetainType(QualType Ty)
Emit the type even if it might not be used.
void EmitInlineFunctionEnd(CGBuilderTy &Builder)
End an inlined function scope.
ParamDecl2StmtTy & getCoroutineParameterMappings()
void EmitFunctionDecl(GlobalDecl GD, SourceLocation Loc, QualType FnType, llvm::Function *Fn=nullptr)
Emit debug info for a function declaration.
void AddStringLiteralDebugInfo(llvm::GlobalVariable *GV, const StringLiteral *S)
DebugInfo isn't attached to string literals by default.
llvm::DILocalVariable * EmitDeclareOfAutoVariable(const VarDecl *Decl, llvm::Value *AI, CGBuilderTy &Builder, const bool UsePointerValue=false)
Emit call to llvm.dbg.declare for an automatic variable declaration.
void completeClassData(const RecordDecl *RD)
void EmitInlineFunctionStart(CGBuilderTy &Builder, GlobalDecl GD)
Start a new scope for an inlined function.
void setModuleMap(ModuleMap &MMap)
When generating debug information for a clang module or precompiled header, this module map will be u...
void EmitImportDecl(const ImportDecl &ID)
Emit an @import declaration.
void EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block, StringRef Name, unsigned ArgNo, llvm::AllocaInst *LocalAddr, CGBuilderTy &Builder)
Emit call to llvm.dbg.declare for the block-literal argument to a block invocation function.
llvm::DebugLoc SourceLocToDebugLoc(SourceLocation Loc)
void completeClass(const RecordDecl *RD)
void EmitLexicalBlockStart(CGBuilderTy &Builder, SourceLocation Loc)
Emit metadata to indicate the beginning of a new lexical block and push the block onto the stack.
friend class SaveAndRestoreLocation
void setLocation(SourceLocation Loc)
Update the current source location.
llvm::DIMacro * CreateMacro(llvm::DIMacroFile *Parent, unsigned MType, SourceLocation LineLoc, StringRef Name, StringRef Value)
Create debug info for a macro defined by a #define directive or a macro undefined by a #undef directi...
llvm::DILocation * CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation, StringRef Category, StringRef FailureMsg)
Create a debug location from TrapLocation that adds an artificial inline frame where the frame name i...
llvm::DIType * getOrCreateRecordType(QualType Ty, SourceLocation L)
Emit record type's standalone debug info.
void EmitPseudoVariable(CGBuilderTy &Builder, llvm::Instruction *Value, QualType Ty)
Emit a pseudo variable and debug info for an intermediate value if it does not correspond to a variab...
std::string remapDIPath(StringRef) const
Remap a given path with the current debug prefix map.
void EmitExplicitCastType(QualType Ty)
Emit the type explicitly casted to.
void addHeapAllocSiteMetadata(llvm::CallBase *CallSite, QualType AllocatedTy, SourceLocation Loc)
Add heapallocsite metadata for MSAllocator calls.
void setDwoId(uint64_t Signature)
Module debugging: Support for building PCMs.
QualType getFunctionType(const FunctionDecl *FD, QualType RetTy, const SmallVectorImpl< const VarDecl * > &Args)
llvm::DIType * getOrCreateInterfaceType(QualType Ty, SourceLocation Loc)
Emit an Objective-C interface type standalone debug info.
void setPCHDescriptor(ASTSourceDescriptor PCH)
When generating debug information for a clang module or precompiled header, this module map will be u...
uint64_t HighestEmittedAtom
void completeType(const EnumDecl *ED)
void registerVLASizeExpression(QualType Ty, llvm::Metadata *SizeExpr)
Register VLA size expression debug node with the qualified type.
void EmitDeclareOfBlockDeclRefVariable(const VarDecl *variable, llvm::Value *storage, CGBuilderTy &Builder, const CGBlockInfo &blockInfo, llvm::Instruction *InsertPoint=nullptr)
Emit call to llvm.dbg.declare for an imported variable declaration in a block.
llvm::DIImportedEntity * EmitNamespaceAlias(const NamespaceAliasDecl &NA)
Emit C++ namespace alias.
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
This class organizes the cross-function state that is used while generating LLVM code.
~SanitizerDebugLocation()
SanitizerDebugLocation & operator=(SanitizerDebugLocation &)=delete
SanitizerDebugLocation(const SanitizerDebugLocation &)=delete
Complex values, per C99 6.2.5p11.
Represents a concrete matrix type with constant number of rows and columns.
Decl - This represents one declaration (or definition), e.g.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums.
This represents one expression.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Represents a function declaration or definition.
Represents a prototype with parameter type info, e.g.
FunctionType - C99 6.7.5.3 - Function Declarators.
GlobalDecl - represents a global declaration.
Represents an arbitrary, user-specified SPIR-V type instruction.
Describes a module import declaration, which makes the contents of the named module visible in the cu...
An lvalue reference type, per C++11 [dcl.ref].
Represents the declaration of a label.
A pointer to member type per C++ 8.3.3 - Pointers to members.
Represents a C++ namespace alias.
Represent a C++ namespace.
Interfaces are the core concept in Objective-C for object oriented design.
ObjCMethodDecl - Represents an instance or class method declaration.
Represents a pointer to an Objective C object.
Represents a class type in Objective C.
Represents a type parameter type in Objective C.
PointerType - C99 6.7.5.1 - Pointer Declarators.
Callbacks to use to customize the behavior of the pretty-printer.
A (possibly-)qualified type.
An rvalue reference type, per C++11 [dcl.ref].
Represents a struct/union/class.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Smart pointer class that efficiently represents Objective-C method names.
Encodes a location in the source.
This class handles loading and caching of source files into memory.
StringLiteral - This represents a string literal expression, e.g.
Stores a list of template parameters for a TemplateDecl and its derived classes.
Represents a type template specialization; the template must be a class template, a type alias templa...
The base class of the type hierarchy.
Represents a C++ using-declaration.
Represents C++ using-directive.
Represents a C++ using-enum-declaration.
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Represents a variable declaration or definition.
Represents a GCC generic vector type.
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
std::variant< struct RequiresDecl, struct HeaderDecl, struct UmbrellaDirDecl, struct ModuleDecl, struct ExcludeDecl, struct ExportDecl, struct ExportAsDecl, struct ExternModuleDecl, struct UseDecl, struct LinkDecl, struct ConfigMacrosDecl, struct ConflictDecl > Decl
All declarations that can appear in a module declaration.
The JSON file list parser is used to communicate input to InstallAPI.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
const FunctionProtoType * T
@ PCH
Disable validation for a precompiled header and the modules it depends on.
@ Other
Other implicit parameter.
Diagnostic wrappers for TextAPI types for error reporting.
Describes how types, statements, expressions, and declarations should be printed.