<p dir="ltr">And again. Was just reorganizing and didn't think about that part. :)</p>
<div class="gmail_quote">On Jul 2, 2013 9:27 PM, "Craig Topper" <<a href="mailto:craig.topper@gmail.com">craig.topper@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: ctopper<br>
Date: Tue Jul  2 23:24:43 2013<br>
New Revision: 185505<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=185505&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=185505&view=rev</a><br>
Log:<br>
Use SmallVectorImpl& instead of SmallVector& to avoid needlessly respecifying the small vector size.<br>
<br>
Modified:<br>
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=185505&r1=185504&r2=185505&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=185505&r1=185504&r2=185505&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Jul  2 23:24:43 2013<br>
@@ -439,7 +439,7 @@ DIE *DwarfDebug::constructLexicalScopeDI<br>
   if (Scope->isAbstractScope())<br>
     return ScopeDIE;<br>
<br>
-  const SmallVector<InsnRange, 4> &Ranges = Scope->getRanges();<br>
+  const SmallVectorImpl<InsnRange> &Ranges = Scope->getRanges();<br>
   if (Ranges.empty())<br>
     return 0;<br>
<br>
@@ -483,7 +483,7 @@ DIE *DwarfDebug::constructLexicalScopeDI<br>
 // represent this concrete inlined copy of the function.<br>
 DIE *DwarfDebug::constructInlinedScopeDIE(CompileUnit *TheCU,<br>
                                           LexicalScope *Scope) {<br>
-  const SmallVector<InsnRange, 4> &Ranges = Scope->getRanges();<br>
+  const SmallVectorImpl<InsnRange> &Ranges = Scope->getRanges();<br>
   assert(Ranges.empty() == false &&<br>
          "LexicalScope does not have instruction markers!");<br>
<br>
@@ -589,14 +589,14 @@ DIE *DwarfDebug::constructScopeDIE(Compi<br>
         }<br>
<br>
   // Collect lexical scope children first.<br>
-  const SmallVector<DbgVariable *, 8> &Variables = ScopeVariables.lookup(Scope);<br>
+  const SmallVectorImpl<DbgVariable *> &Variables =ScopeVariables.lookup(Scope);<br>
   for (unsigned i = 0, N = Variables.size(); i < N; ++i)<br>
     if (DIE *Variable =<br>
         TheCU->constructVariableDIE(Variables[i], Scope->isAbstractScope())) {<br>
       Children.push_back(Variable);<br>
       if (Variables[i]->isObjectPointer()) ObjectPointer = Variable;<br>
     }<br>
-  const SmallVector<LexicalScope *, 4> &Scopes = Scope->getChildren();<br>
+  const SmallVectorImpl<LexicalScope *> &Scopes = Scope->getChildren();<br>
   for (unsigned j = 0, M = Scopes.size(); j < M; ++j)<br>
     if (DIE *Nested = constructScopeDIE(TheCU, Scopes[j]))<br>
       Children.push_back(Nested);<br>
@@ -1412,7 +1412,7 @@ void DwarfDebug::identifyScopeMarkers()<br>
   while (!WorkList.empty()) {<br>
     LexicalScope *S = WorkList.pop_back_val();<br>
<br>
-    const SmallVector<LexicalScope *, 4> &Children = S->getChildren();<br>
+    const SmallVectorImpl<LexicalScope *> &Children = S->getChildren();<br>
     if (!Children.empty())<br>
       for (SmallVectorImpl<LexicalScope *>::const_iterator SI = Children.begin(),<br>
              SE = Children.end(); SI != SE; ++SI)<br>
@@ -1421,7 +1421,7 @@ void DwarfDebug::identifyScopeMarkers()<br>
     if (S->isAbstractScope())<br>
       continue;<br>
<br>
-    const SmallVector<InsnRange, 4> &Ranges = S->getRanges();<br>
+    const SmallVectorImpl<InsnRange> &Ranges = S->getRanges();<br>
     if (Ranges.empty())<br>
       continue;<br>
     for (SmallVectorImpl<InsnRange>::const_iterator RI = Ranges.begin(),<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>