AsmPrinter: Convert DIE::Values to a linked list
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DIE.cpp
index 80e9096bfea23b6458a00153503b111419deb05c..30493c8256505e7e14d13c21b1b5a3f313da335e 100644 (file)
@@ -165,18 +165,17 @@ void DIE::print(raw_ostream &O, unsigned IndentCount) const {
   }
 
   IndentCount += 2;
-  for (unsigned i = 0, N = Values.size(); i < N; ++i) {
+  unsigned I = 0;
+  for (const auto &V : Values) {
     O << Indent;
 
     if (!isBlock)
-      O << dwarf::AttributeString(Values[i].getAttribute());
+      O << dwarf::AttributeString(V.getAttribute());
     else
-      O << "Blk[" << i << "]";
+      O << "Blk[" << I++ << "]";
 
-    O <<  "  "
-      << dwarf::FormEncodingString(Values[i].getForm())
-      << " ";
-    Values[i].print(O);
+    O << "  " << dwarf::FormEncodingString(V.getForm()) << " ";
+    V.print(O);
     O << "\n";
   }
   IndentCount -= 2;