Lines Matching refs:llvm
1 //===--- CGDebugInfo.h - DebugInfo for LLVM CodeGen -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
10 // This is the source level debug info generator for llvm translation.
20 #include "llvm/ADT/DenseMap.h"
21 #include "llvm/Analysis/DebugInfo.h"
22 #include "llvm/Analysis/DIBuilder.h"
23 #include "llvm/Support/ValueHandle.h"
24 #include "llvm/Support/Allocator.h"
28 namespace llvm {
44 /// and is responsible for emitting to llvm globals or pass directly to
48 llvm::DIBuilder DBuilder;
49 llvm::DICompileUnit TheCU;
51 llvm::DIType VTablePtrType;
54 llvm::DenseMap<void *, llvm::WeakVH> TypeCache;
57 llvm::DIType BlockLiteralGeneric;
60 std::vector<llvm::TrackingVH<llvm::MDNode> > LexicalBlockStack;
61 llvm::DenseMap<const Decl *, llvm::WeakVH> RegionMap;
69 llvm::BumpPtrAllocator DebugInfoNames;
72 llvm::DenseMap<const char *, llvm::WeakVH> DIFileCache;
73 llvm::DenseMap<const FunctionDecl *, llvm::WeakVH> SPCache;
74 llvm::DenseMap<const NamespaceDecl *, llvm::WeakVH> NameSpaceCache;
77 llvm::DIType CreateType(const BuiltinType *Ty);
78 llvm::DIType CreateType(const ComplexType *Ty);
79 llvm::DIType CreateQualifiedType(QualType Ty, llvm::DIFile F);
80 llvm::DIType CreateType(const TypedefType *Ty, llvm::DIFile F);
81 llvm::DIType CreateType(const ObjCObjectPointerType *Ty,
82 llvm::DIFile F);
83 llvm::DIType CreateType(const PointerType *Ty, llvm::DIFile F);
84 llvm::DIType CreateType(const BlockPointerType *Ty, llvm::DIFile F);
85 llvm::DIType CreateType(const FunctionType *Ty, llvm::DIFile F);
86 llvm::DIType CreateType(const TagType *Ty);
87 llvm::DIType CreateType(const RecordType *Ty);
88 llvm::DIType CreateType(const ObjCInterfaceType *Ty, llvm::DIFile F);
89 llvm::DIType CreateType(const ObjCObjectType *Ty, llvm::DIFile F);
90 llvm::DIType CreateType(const VectorType *Ty, llvm::DIFile F);
91 llvm::DIType CreateType(const ArrayType *Ty, llvm::DIFile F);
92 llvm::DIType CreateType(const LValueReferenceType *Ty, llvm::DIFile F);
93 llvm::DIType CreateType(const RValueReferenceType *Ty, llvm::DIFile Unit);
94 llvm::DIType CreateType(const MemberPointerType *Ty, llvm::DIFile F);
95 llvm::DIType CreateType(const AtomicType *Ty, llvm::DIFile F);
96 llvm::DIType CreateEnumType(const EnumDecl *ED);
97 llvm::DIType getOrCreateMethodType(const CXXMethodDecl *Method,
98 llvm::DIFile F);
99 llvm::DIType getOrCreateFunctionType(const Decl *D, QualType FnType,
100 llvm::DIFile F);
101 llvm::DIType getOrCreateVTablePtrType(llvm::DIFile F);
102 llvm::DINameSpace getOrCreateNameSpace(const NamespaceDecl *N);
103 llvm::DIType CreatePointeeType(QualType PointeeTy, llvm::DIFile F);
104 llvm::DIType CreatePointerLikeType(unsigned Tag,
106 llvm::DIFile F);
108 llvm::DISubprogram CreateCXXMemberFunction(const CXXMethodDecl *Method,
109 llvm::DIFile F,
110 llvm::DIType RecordTy);
113 llvm::DIFile F,
114 SmallVectorImpl<llvm::Value *> &E,
115 llvm::DIType T);
118 llvm::DIFile F,
119 SmallVectorImpl<llvm::Value *> &EltTys,
120 llvm::DIType RecordTy);
123 llvm::DIFile F,
124 SmallVectorImpl<llvm::Value *> &EltTys,
125 llvm::DIType RecordTy);
127 llvm::DIArray
130 llvm::DIFile Unit);
131 llvm::DIArray
132 CollectFunctionTemplateParams(const FunctionDecl *FD, llvm::DIFile Unit);
133 llvm::DIArray
135 llvm::DIFile F);
137 llvm::DIType createFieldType(StringRef name, QualType type,
140 llvm::DIFile tunit,
141 llvm::DIDescriptor scope);
142 void CollectRecordFields(const RecordDecl *Decl, llvm::DIFile F,
143 SmallVectorImpl<llvm::Value *> &E,
144 llvm::DIType RecordTy);
147 llvm::DIFile F,
148 SmallVectorImpl<llvm::Value *> &EltTys);
167 /// EmitFunctionStart - Emit a call to llvm.dbg.function.start to indicate
170 llvm::Function *Fn, CGBuilderTy &Builder);
187 /// EmitDeclareOfAutoVariable - Emit call to llvm.dbg.declare for an automatic
189 void EmitDeclareOfAutoVariable(const VarDecl *Decl, llvm::Value *AI,
192 /// EmitDeclareOfBlockDeclRefVariable - Emit call to llvm.dbg.declare for an
195 llvm::Value *storage,
199 /// EmitDeclareOfArgVariable - Emit call to llvm.dbg.declare for an argument
201 void EmitDeclareOfArgVariable(const VarDecl *Decl, llvm::Value *AI,
205 /// llvm.dbg.declare for the block-literal argument to a block
208 llvm::Value *addr,
212 void EmitGlobalVariable(llvm::GlobalVariable *GV, const VarDecl *Decl);
215 void EmitGlobalVariable(llvm::GlobalVariable *GV, ObjCInterfaceDecl *Decl);
218 void EmitGlobalVariable(const ValueDecl *VD, llvm::Constant *Init);
221 llvm::DIType getOrCreateRecordType(QualType Ty, SourceLocation L);
223 /// EmitDeclare - Emit call to llvm.dbg.declare for a variable declaration.
224 void EmitDeclare(const VarDecl *decl, unsigned Tag, llvm::Value *AI,
229 llvm::DIType EmitTypeForVarWithBlocksAttr(const ValueDecl *VD,
233 llvm::DIDescriptor getContextDescriptor(const Decl *Decl);
243 llvm::DIFile getOrCreateFile(SourceLocation Loc);
246 llvm::DIFile getOrCreateMainFile();
250 llvm::DIType getOrCreateType(QualType Ty, llvm::DIFile F);
253 llvm::DIType CreateTypeNode(QualType Ty, llvm::DIFile F);
256 llvm::DIType CreateMemberType(llvm::DIFile Unit, QualType FType,
261 llvm::DISubprogram getFunctionDeclaration(const Decl *D);