Use a range based for loop for the SubtargetFeatures print function.
authorEric Christopher <echristo@gmail.com>
Tue, 6 May 2014 21:20:29 +0000 (21:20 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 6 May 2014 21:20:29 +0000 (21:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208132 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/SubtargetFeature.cpp

index 844df0aed109a4145bd3a63451e88832c153b84c..3be6d9641b3653061989151d451080de410e9f91 100644 (file)
@@ -309,8 +309,8 @@ SubtargetFeatures::getFeatureBits(const StringRef CPU,
 /// print - Print feature string.
 ///
 void SubtargetFeatures::print(raw_ostream &OS) const {
-  for (size_t i = 0, e = Features.size(); i != e; ++i)
-    OS << Features[i] << "  ";
+  for (auto &F : Features)
+    OS << F << " ";
   OS << "\n";
 }