AsmPrinter: Use an intrusively linked list for DIE::Children
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DIE.cpp
index 30493c8256505e7e14d13c21b1b5a3f313da335e..46dbc7693698d39e1277886ffcb08dc2be88d345 100644 (file)
@@ -180,9 +180,8 @@ void DIE::print(raw_ostream &O, unsigned IndentCount) const {
   }
   IndentCount -= 2;
 
-  for (unsigned j = 0, M = Children.size(); j < M; ++j) {
-    Children[j]->print(O, IndentCount+4);
-  }
+  for (const auto &Child : children())
+    Child.print(O, IndentCount + 4);
 
   if (!isBlock) O << "\n";
 }