[llvm] r259763 - [Support] Use range-based for loop. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 22:51:41 PST 2016
Author: ctopper
Date: Thu Feb 4 00:51:41 2016
New Revision: 259763
URL: http://llvm.org/viewvc/llvm-project?rev=259763&view=rev
Log:
[Support] Use range-based for loop. NFC
Modified:
llvm/trunk/lib/Support/raw_ostream.cpp
Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=259763&r1=259762&r2=259763&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Thu Feb 4 00:51:41 2016
@@ -181,9 +181,7 @@ raw_ostream &raw_ostream::write_hex(unsi
raw_ostream &raw_ostream::write_escaped(StringRef Str,
bool UseHexEscapes) {
- for (unsigned i = 0, e = Str.size(); i != e; ++i) {
- unsigned char c = Str[i];
-
+ for (unsigned char c : Str) {
switch (c) {
case '\\':
*this << '\\' << '\\';
More information about the llvm-commits
mailing list