OSDN Git Service

Simplify some code.
authorBill Wendling <isanbard@gmail.com>
Fri, 1 May 2009 08:32:14 +0000 (08:32 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 1 May 2009 08:32:14 +0000 (08:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70534 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfWriter.cpp

index b454cd0..c61a5a8 100644 (file)
@@ -3545,14 +3545,11 @@ public:
 
     DenseMap<GlobalVariable *, SmallVector<DbgScope *, 2> >::iterator
       SI = DbgInlinedScopeMap.find(GV);
-    if (SI == DbgInlinedScopeMap.end()) {
-      SmallVector<DbgScope *, 2> Scopes;
-      Scopes.push_back(Scope);
-      DbgInlinedScopeMap[GV] = Scopes;
-    } else {
-      SmallVector<DbgScope *, 2> &Scopes = SI->second;
-      Scopes.push_back(Scope);
-    }
+
+    if (SI == DbgInlinedScopeMap.end())
+      DbgInlinedScopeMap[GV].push_back(Scope);
+    else
+      SI->second.push_back(Scope);
 
     DenseMap<GlobalVariable *, SmallVector<unsigned, 4> >::iterator
       I = InlineInfo.find(GV);