DebugInfo: Revert change to the return type of createRecordFwdDecl

It still does only return DICompositeType, but I've no need to make that
change right now.

llvm-svn: 188482
This commit is contained in:
David Blaikie 2013-08-15 20:17:25 +00:00
parent bbecd09658
commit 4e7ef80e68
2 changed files with 4 additions and 7 deletions

View File

@ -602,11 +602,9 @@ llvm::DIType CGDebugInfo::CreateType(const PointerType *Ty,
}
// Creates a forward declaration for a RecordDecl in the given context.
llvm::DICompositeType
CGDebugInfo::getOrCreateRecordFwdDecl(const RecordDecl *RD,
llvm::DIDescriptor Ctx) {
llvm::DICompositeType T(getTypeOrNull(CGM.getContext().getRecordType(RD)));
if (T)
llvm::DIType CGDebugInfo::getOrCreateRecordFwdDecl(const RecordDecl *RD,
llvm::DIDescriptor Ctx) {
if (llvm::DIType T = getTypeOrNull(CGM.getContext().getRecordType(RD)))
return T;
llvm::DIFile DefUnit = getOrCreateFile(RD->getLocation());
unsigned Line = getLineNumber(RD->getLocation());

View File

@ -306,8 +306,7 @@ private:
llvm::DIScope getCurrentContextDescriptor(const Decl *Decl);
/// \brief Create a forward decl for a RecordType in a given context.
llvm::DICompositeType getOrCreateRecordFwdDecl(const RecordDecl *,
llvm::DIDescriptor);
llvm::DIType getOrCreateRecordFwdDecl(const RecordDecl *, llvm::DIDescriptor);
/// createContextChain - Create a set of decls for the context chain.
llvm::DIDescriptor createContextChain(const Decl *Decl);