r182403 - Debug Info: don't bother reinserting elements into maps we just retrieved them from

David Blaikie dblaikie at gmail.com
Tue May 21 11:08:19 PDT 2013


Author: dblaikie
Date: Tue May 21 13:08:19 2013
New Revision: 182403

URL: http://llvm.org/viewvc/llvm-project?rev=182403&view=rev
Log:
Debug Info: don't bother reinserting elements into maps we just retrieved them from

(no intended behavior 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=182403&r1=182402&r2=182403&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue May 21 13:08:19 2013
@@ -1936,16 +1936,17 @@ llvm::DIType CGDebugInfo::getOrCreateTyp
       ::iterator it = ObjCInterfaceCache.find(TyPtr);
     if (it != ObjCInterfaceCache.end())
       TC = llvm::DIType(cast<llvm::MDNode>(it->second.first));
-    else
+    else {
       TC = DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
                                       Decl->getName(), TheCU, Unit,
                                       getLineNumber(Decl->getLocation()),
                                       TheCU.getLanguage());
-    // Store the forward declaration in the cache.
-    ObjCInterfaceCache[TyPtr] = std::make_pair(TC, Checksum(Decl));
+      // Store the forward declaration in the cache.
+      ObjCInterfaceCache[TyPtr] = std::make_pair(TC, Checksum(Decl));
 
-    // Register the type for replacement in finalize().
-    ReplaceMap.push_back(std::make_pair(TyPtr, static_cast<llvm::Value*>(TC)));
+      // Register the type for replacement in finalize().
+      ReplaceMap.push_back(std::make_pair(TyPtr, static_cast<llvm::Value*>(TC)));
+    }
     return TC;
   }
 





More information about the cfe-commits mailing list