r187594 - Reduce a variable's scope (no functionality change)

David Blaikie dblaikie at gmail.com
Thu Aug 1 11:23:24 PDT 2013


Author: dblaikie
Date: Thu Aug  1 13:23:24 2013
New Revision: 187594

URL: http://llvm.org/viewvc/llvm-project?rev=187594&view=rev
Log:
Reduce a variable's scope (no functionality change)

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=187594&r1=187593&r2=187594&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Aug  1 13:23:24 2013
@@ -2207,7 +2207,6 @@ llvm::DIType CGDebugInfo::CreateLimitedT
 
   uint64_t Size = CGM.getContext().getTypeSize(Ty);
   uint64_t Align = CGM.getContext().getTypeAlign(Ty);
-  const CXXRecordDecl *CXXDecl = dyn_cast<CXXRecordDecl>(RD);
   llvm::DICompositeType RealDecl;
 
   if (RD->isUnion())
@@ -2228,7 +2227,7 @@ llvm::DIType CGDebugInfo::CreateLimitedT
   RegionMap[Ty->getDecl()] = llvm::WeakVH(RealDecl);
   TypeCache[QualType(Ty, 0).getAsOpaquePtr()] = RealDecl;
 
-  if (CXXDecl) {
+  if (const CXXRecordDecl *CXXDecl = dyn_cast<CXXRecordDecl>(RD)) {
     // A class's primary base or the class itself contains the vtable.
     llvm::DICompositeType ContainingType;
     const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(RD);





More information about the cfe-commits mailing list