aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-02-15 23:25:18 +0000
committerEric Christopher <echristo@apple.com>2012-02-15 23:25:18 +0000
commit9a68d4584afcd0853b930bd80235b58736e785b4 (patch)
treed3432c3434e7c238c600f2573f41ba0357865a4f /lib/CodeGen/CGDebugInfo.h
parent3ad02aa90105a9fcfd3d4328e800aa1362a90234 (diff)
Add a completed/incomplete type difference. This allows us to have
partial types for contexts and forward decls while allowing us to complete types later on for debug purposes. This piggy-backs on the metadata replacement and rauw changes for temporary nodes and takes advantage of the incremental support I added in earlier. This allows us to, if we decide, to limit adding methods and variables to structures in order to limit the amount of debug information output into a .o file. The caching is a bit complicated though so any thoughts on untangling that are welcome. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.h')
-rw-r--r--lib/CodeGen/CGDebugInfo.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h
index 48cf3fa19e..640026673b 100644
--- a/lib/CodeGen/CGDebugInfo.h
+++ b/lib/CodeGen/CGDebugInfo.h
@@ -53,6 +53,9 @@ class CGDebugInfo {
/// TypeCache - Cache of previously constructed Types.
llvm::DenseMap<void *, llvm::WeakVH> TypeCache;
+ /// CompleteTypeCache - Cache of previously constructed complete RecordTypes.
+ llvm::DenseMap<void *, llvm::WeakVH> CompletedTypeCache;
+
bool BlockLiteralGenericSet;
llvm::DIType BlockLiteralGeneric;
@@ -84,6 +87,7 @@ class CGDebugInfo {
llvm::DIType CreateType(const BlockPointerType *Ty, llvm::DIFile F);
llvm::DIType CreateType(const FunctionType *Ty, llvm::DIFile F);
llvm::DIType CreateType(const RecordType *Ty);
+ llvm::DIType CreateLimitedType(const RecordType *Ty);
llvm::DIType CreateType(const ObjCInterfaceType *Ty, llvm::DIFile F);
llvm::DIType CreateType(const ObjCObjectType *Ty, llvm::DIFile F);
llvm::DIType CreateType(const VectorType *Ty, llvm::DIFile F);
@@ -94,6 +98,7 @@ class CGDebugInfo {
llvm::DIType CreateType(const AtomicType *Ty, llvm::DIFile F);
llvm::DIType CreateEnumType(const EnumDecl *ED);
llvm::DIType getTypeOrNull(const QualType);
+ llvm::DIType getCompletedTypeOrNull(const QualType);
llvm::DIType getOrCreateMethodType(const CXXMethodDecl *Method,
llvm::DIFile F);
llvm::DIType getOrCreateFunctionType(const Decl *D, QualType FnType,
@@ -257,9 +262,17 @@ private:
/// necessary.
llvm::DIType getOrCreateType(QualType Ty, llvm::DIFile F);
+ /// getOrCreateLimitedType - Get the type from the cache or create a new
+ /// partial type if necessary.
+ llvm::DIType getOrCreateLimitedType(QualType Ty, llvm::DIFile F);
+
/// CreateTypeNode - Create type metadata for a source language type.
llvm::DIType CreateTypeNode(QualType Ty, llvm::DIFile F);
+ /// CreateLimitedTypeNode - Create type metadata for a source language
+ /// type, but only partial types for records.
+ llvm::DIType CreateLimitedTypeNode(QualType Ty, llvm::DIFile F);
+
/// CreateMemberType - Create new member and increase Offset by FType's size.
llvm::DIType CreateMemberType(llvm::DIFile Unit, QualType FType,
StringRef Name, uint64_t *Offset);