Mercurial > hg > CbC > CbC_llvm
comparison clang/lib/CodeGen/CGDebugInfo.h @ 173:0572611fdcc8 llvm10 llvm12
reorgnization done
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 11:55:54 +0900 |
parents | 1d019706d866 |
children | 2e18cbf3894f |
comparison
equal
deleted
inserted
replaced
172:9fbae9c8bf63 | 173:0572611fdcc8 |
---|---|
15 | 15 |
16 #include "CGBuilder.h" | 16 #include "CGBuilder.h" |
17 #include "clang/AST/DeclCXX.h" | 17 #include "clang/AST/DeclCXX.h" |
18 #include "clang/AST/Expr.h" | 18 #include "clang/AST/Expr.h" |
19 #include "clang/AST/ExternalASTSource.h" | 19 #include "clang/AST/ExternalASTSource.h" |
20 #include "clang/AST/PrettyPrinter.h" | |
20 #include "clang/AST/Type.h" | 21 #include "clang/AST/Type.h" |
21 #include "clang/AST/TypeOrdering.h" | 22 #include "clang/AST/TypeOrdering.h" |
22 #include "clang/Basic/CodeGenOptions.h" | 23 #include "clang/Basic/CodeGenOptions.h" |
24 #include "clang/Basic/Module.h" | |
23 #include "clang/Basic/SourceLocation.h" | 25 #include "clang/Basic/SourceLocation.h" |
24 #include "llvm/ADT/DenseMap.h" | 26 #include "llvm/ADT/DenseMap.h" |
25 #include "llvm/ADT/DenseSet.h" | 27 #include "llvm/ADT/DenseSet.h" |
26 #include "llvm/ADT/Optional.h" | 28 #include "llvm/ADT/Optional.h" |
27 #include "llvm/IR/DIBuilder.h" | 29 #include "llvm/IR/DIBuilder.h" |
58 const codegenoptions::DebugInfoKind DebugKind; | 60 const codegenoptions::DebugInfoKind DebugKind; |
59 bool DebugTypeExtRefs; | 61 bool DebugTypeExtRefs; |
60 llvm::DIBuilder DBuilder; | 62 llvm::DIBuilder DBuilder; |
61 llvm::DICompileUnit *TheCU = nullptr; | 63 llvm::DICompileUnit *TheCU = nullptr; |
62 ModuleMap *ClangModuleMap = nullptr; | 64 ModuleMap *ClangModuleMap = nullptr; |
63 ExternalASTSource::ASTSourceDescriptor PCHDescriptor; | 65 ASTSourceDescriptor PCHDescriptor; |
64 SourceLocation CurLoc; | 66 SourceLocation CurLoc; |
65 llvm::MDNode *CurInlinedAt = nullptr; | 67 llvm::MDNode *CurInlinedAt = nullptr; |
66 llvm::DIType *VTablePtrType = nullptr; | 68 llvm::DIType *VTablePtrType = nullptr; |
67 llvm::DIType *ClassTy = nullptr; | 69 llvm::DIType *ClassTy = nullptr; |
68 llvm::DICompositeType *ObjTy = nullptr; | 70 llvm::DICompositeType *ObjTy = nullptr; |
164 /// Currently the checksum of an interface includes the number of | 166 /// Currently the checksum of an interface includes the number of |
165 /// ivars and property accessors. | 167 /// ivars and property accessors. |
166 llvm::DIType *CreateType(const BuiltinType *Ty); | 168 llvm::DIType *CreateType(const BuiltinType *Ty); |
167 llvm::DIType *CreateType(const ComplexType *Ty); | 169 llvm::DIType *CreateType(const ComplexType *Ty); |
168 llvm::DIType *CreateType(const AutoType *Ty); | 170 llvm::DIType *CreateType(const AutoType *Ty); |
171 llvm::DIType *CreateType(const ExtIntType *Ty); | |
169 llvm::DIType *CreateQualifiedType(QualType Ty, llvm::DIFile *Fg); | 172 llvm::DIType *CreateQualifiedType(QualType Ty, llvm::DIFile *Fg); |
170 llvm::DIType *CreateType(const TypedefType *Ty, llvm::DIFile *Fg); | 173 llvm::DIType *CreateType(const TypedefType *Ty, llvm::DIFile *Fg); |
171 llvm::DIType *CreateType(const TemplateSpecializationType *Ty, | 174 llvm::DIType *CreateType(const TemplateSpecializationType *Ty, |
172 llvm::DIFile *Fg); | 175 llvm::DIFile *Fg); |
173 llvm::DIType *CreateType(const ObjCObjectPointerType *Ty, llvm::DIFile *F); | 176 llvm::DIType *CreateType(const ObjCObjectPointerType *Ty, llvm::DIFile *F); |
187 /// Get Objective-C object type. | 190 /// Get Objective-C object type. |
188 llvm::DIType *CreateType(const ObjCObjectType *Ty, llvm::DIFile *F); | 191 llvm::DIType *CreateType(const ObjCObjectType *Ty, llvm::DIFile *F); |
189 llvm::DIType *CreateType(const ObjCTypeParamType *Ty, llvm::DIFile *Unit); | 192 llvm::DIType *CreateType(const ObjCTypeParamType *Ty, llvm::DIFile *Unit); |
190 | 193 |
191 llvm::DIType *CreateType(const VectorType *Ty, llvm::DIFile *F); | 194 llvm::DIType *CreateType(const VectorType *Ty, llvm::DIFile *F); |
195 llvm::DIType *CreateType(const ConstantMatrixType *Ty, llvm::DIFile *F); | |
192 llvm::DIType *CreateType(const ArrayType *Ty, llvm::DIFile *F); | 196 llvm::DIType *CreateType(const ArrayType *Ty, llvm::DIFile *F); |
193 llvm::DIType *CreateType(const LValueReferenceType *Ty, llvm::DIFile *F); | 197 llvm::DIType *CreateType(const LValueReferenceType *Ty, llvm::DIFile *F); |
194 llvm::DIType *CreateType(const RValueReferenceType *Ty, llvm::DIFile *Unit); | 198 llvm::DIType *CreateType(const RValueReferenceType *Ty, llvm::DIFile *Unit); |
195 llvm::DIType *CreateType(const MemberPointerType *Ty, llvm::DIFile *F); | 199 llvm::DIType *CreateType(const MemberPointerType *Ty, llvm::DIFile *F); |
196 llvm::DIType *CreateType(const AtomicType *Ty, llvm::DIFile *F); | 200 llvm::DIType *CreateType(const AtomicType *Ty, llvm::DIFile *F); |
377 void setModuleMap(ModuleMap &MMap) { ClangModuleMap = &MMap; } | 381 void setModuleMap(ModuleMap &MMap) { ClangModuleMap = &MMap; } |
378 | 382 |
379 /// When generating debug information for a clang module or | 383 /// When generating debug information for a clang module or |
380 /// precompiled header, this module map will be used to determine | 384 /// precompiled header, this module map will be used to determine |
381 /// the module of origin of each Decl. | 385 /// the module of origin of each Decl. |
382 void setPCHDescriptor(ExternalASTSource::ASTSourceDescriptor PCH) { | 386 void setPCHDescriptor(ASTSourceDescriptor PCH) { PCHDescriptor = PCH; } |
383 PCHDescriptor = PCH; | |
384 } | |
385 /// @} | 387 /// @} |
386 | 388 |
387 /// Update the current source location. If \arg loc is invalid it is | 389 /// Update the current source location. If \arg loc is invalid it is |
388 /// ignored. | 390 /// ignored. |
389 void setLocation(SourceLocation Loc); | 391 void setLocation(SourceLocation Loc); |
588 /// Get the type from the cache or create a new type if necessary. | 590 /// Get the type from the cache or create a new type if necessary. |
589 llvm::DIType *getOrCreateType(QualType Ty, llvm::DIFile *Fg); | 591 llvm::DIType *getOrCreateType(QualType Ty, llvm::DIFile *Fg); |
590 | 592 |
591 /// Get a reference to a clang module. If \p CreateSkeletonCU is true, | 593 /// Get a reference to a clang module. If \p CreateSkeletonCU is true, |
592 /// this also creates a split dwarf skeleton compile unit. | 594 /// this also creates a split dwarf skeleton compile unit. |
593 llvm::DIModule * | 595 llvm::DIModule *getOrCreateModuleRef(ASTSourceDescriptor Mod, |
594 getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod, | 596 bool CreateSkeletonCU); |
595 bool CreateSkeletonCU); | |
596 | 597 |
597 /// DebugTypeExtRefs: If \p D originated in a clang module, return it. | 598 /// DebugTypeExtRefs: If \p D originated in a clang module, return it. |
598 llvm::DIModule *getParentModuleOrNull(const Decl *D); | 599 llvm::DIModule *getParentModuleOrNull(const Decl *D); |
599 | 600 |
600 /// Get the type from the cache or create a new partial type if | 601 /// Get the type from the cache or create a new partial type if |