DebugInfo: Unify & optimize the lazy addition of record types
Rather than going through the whole getOrCreateType machinery to
manifest a type, cut straight to the implementation because we know we
have to do work.
While the previous implementation was sufficient for the two cases
(completeness and required completeness) we have already (the general
machinery could inspect the type for those attributes & go down the full
definition path), a pending change (to emit info for types when we emit
their vtables) won't have that luxury & we'll need to force the creation
rather than relying on the general purpose routine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188486 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h
index 74b8e95..72d956e 100644
--- a/lib/CodeGen/CGDebugInfo.h
+++ b/lib/CodeGen/CGDebugInfo.h
@@ -115,6 +115,7 @@
llvm::DIType CreateType(const BlockPointerType *Ty, llvm::DIFile F);
llvm::DIType CreateType(const FunctionType *Ty, llvm::DIFile F);
llvm::DIType CreateType(const RecordType *Ty, bool Declaration);
+ llvm::DIType CreateTypeDefinition(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);
@@ -288,7 +289,9 @@
llvm::DIType getOrCreateInterfaceType(QualType Ty,
SourceLocation Loc);
- void completeFwdDecl(const RecordDecl &TD);
+ void completeType(const RecordDecl *RD);
+ void completeRequiredType(const RecordDecl *RD);
+
private:
/// EmitDeclare - Emit call to llvm.dbg.declare for a variable declaration.