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

Eric Christopher echristo at apple.com
Wed Jan 25 22:20:58 PST 2012


Author: echristo
Date: Thu Jan 26 00:20:57 2012
New Revision: 149047

URL: http://llvm.org/viewvc/llvm-project?rev=149047&view=rev
Log:
Remove another duplicated variable.

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=149047&r1=149046&r2=149047&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Jan 26 00:20:57 2012
@@ -1126,7 +1126,6 @@
 /// CreateType - get structure or union type.
 llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty) {
   RecordDecl *RD = Ty->getDecl();
-  llvm::DIFile Unit = getOrCreateFile(RD->getLocation());
 
   // Get overall information about the record type for the debug info.
   llvm::DIFile DefUnit = getOrCreateFile(RD->getLocation());
@@ -1174,19 +1173,19 @@
 
   // Collect static variables with initializers.
   CollectRecordStaticVars(RD, FwdDecl);
-  CollectRecordFields(RD, Unit, EltTys, FwdDecl);
+  CollectRecordFields(RD, DefUnit, EltTys, FwdDecl);
 
   // Collect C++ information.
   const CXXRecordDecl *CXXDecl = dyn_cast<CXXRecordDecl>(RD);
   llvm::DIArray TParamsArray;
   if (CXXDecl) {
-    CollectCXXBases(CXXDecl, Unit, EltTys, FwdDecl);
-    CollectVTableInfo(CXXDecl, Unit, EltTys);
-    CollectCXXMemberFunctions(CXXDecl, Unit, EltTys, FwdDecl);
-    CollectCXXFriends(CXXDecl, Unit, EltTys, FwdDecl);
+    CollectCXXBases(CXXDecl, DefUnit, EltTys, FwdDecl);
+    CollectVTableInfo(CXXDecl, DefUnit, EltTys);
+    CollectCXXMemberFunctions(CXXDecl, DefUnit, EltTys, FwdDecl);
+    CollectCXXFriends(CXXDecl, DefUnit, EltTys, FwdDecl);
     if (const ClassTemplateSpecializationDecl *TSpecial
         = dyn_cast<ClassTemplateSpecializationDecl>(RD))
-      TParamsArray = CollectCXXTemplateParams(TSpecial, Unit);
+      TParamsArray = CollectCXXTemplateParams(TSpecial, DefUnit);
   }
 
   LexicalBlockStack.pop_back();
@@ -1219,7 +1218,7 @@
           break;
       }
       ContainingType = 
-        getOrCreateType(QualType(PBase->getTypeForDecl(), 0), Unit);
+        getOrCreateType(QualType(PBase->getTypeForDecl(), 0), DefUnit);
     }
     else if (CXXDecl->isDynamicClass()) 
       ContainingType = FwdDecl;





More information about the cfe-commits mailing list