Skip to content

Commit 50db127

Browse files
committed
[Support] Use range-based for loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259763 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent a7bacb7 commit 50db127

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Support/raw_ostream.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ raw_ostream &raw_ostream::write_hex(unsigned long long N) {
181181

182182
raw_ostream &raw_ostream::write_escaped(StringRef Str,
183183
bool UseHexEscapes) {
184-
for (unsigned i = 0, e = Str.size(); i != e; ++i) {
185-
unsigned char c = Str[i];
186-
184+
for (unsigned char c : Str) {
187185
switch (c) {
188186
case '\\':
189187
*this << '\\' << '\\';

0 commit comments

Comments
 (0)