[cfe-commits] r149051 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Eric Christopher echristo at apple.com
Wed Jan 25 23:11:59 PST 2012


Author: echristo
Date: Thu Jan 26 01:11:58 2012
New Revision: 149051

URL: http://llvm.org/viewvc/llvm-project?rev=149051&view=rev
Log:
Use createRecordFwdDecl here since that's what we're doing.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=149051&r1=149050&r2=149051&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Jan 26 01:11:58 2012
@@ -1147,15 +1147,8 @@
 
   // 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);
 





More information about the cfe-commits mailing list