incorporate feedback from River.
authorChris Lattner <chrisl@clattner-0291.local>
Fri, 13 Mar 2020 05:26:44 +0000 (22:26 -0700)
committerChris Lattner <chrisl@clattner-0291.local>
Fri, 13 Mar 2020 05:36:42 +0000 (22:36 -0700)
mlir/lib/IR/AsmPrinter.cpp

index b517600..bbb2462 100644 (file)
@@ -760,8 +760,8 @@ void SSANameState::setValueName(Value value, StringRef name) {
   valueNames[value] = uniqueValueName(name);
 }
 
-// Returns true if 'c' is an allowable punctuation character: [$._-]
-// Returns false otherwise.
+/// Returns true if 'c' is an allowable punctuation character: [$._-]
+/// Returns false otherwise.
 static bool isPunct(char c) {
   return c == '$' || c == '.' || c == '_' || c == '-';
 }
@@ -780,12 +780,12 @@ StringRef SSANameState::uniqueValueName(StringRef name) {
   
   // Check to see if the name consists of all-valid identifiers.  If not, we
   // need to escape them.
-  for (auto ch : name) {
+  for (char ch : name) {
     if (isalpha(ch) || isPunct(ch) || isdigit(ch))
       continue;
     
     SmallString<16> tmpName;
-    for (auto ch : name) {
+    for (char ch : name) {
       if (isalpha(ch) || isPunct(ch) || isdigit(ch))
         tmpName += ch;
       else if (ch == ' ')