]> granicus.if.org Git - clang/commitdiff
Use createRecordFwdDecl here since that's what we're doing.
authorEric Christopher <echristo@apple.com>
Thu, 26 Jan 2012 07:11:58 +0000 (07:11 +0000)
committerEric Christopher <echristo@apple.com>
Thu, 26 Jan 2012 07:11:58 +0000 (07:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149051 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 6a775ccba648506c61b98a8cea48e0e8ebd4001b..2ddfd3108352b030b8b094d358e6b8cf67f53575 100644 (file)
@@ -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);