diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 6a775ccba6..2ddfd31083 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1147,15 +1147,8 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty) { // If this is just a forward declaration, construct an appropriately // marked node and just return it. - if (!RD->getDefinition()) { - llvm::DIType FwdDecl = - DBuilder.createStructType(RDContext, RDName, - DefUnit, Line, 0, 0, - llvm::DIDescriptor::FlagFwdDecl, - llvm::DIArray()); - - return FwdDecl; - } + if (!RD->getDefinition()) + return createRecordFwdDecl(RD, RDContext); llvm::DIType FwdDecl = DBuilder.createTemporaryType(DefUnit); |