[Mlir-commits] [mlir] e0a93ce - incorporate feedback from River.
Chris Lattner
llvmlistbot at llvm.org
Thu Mar 12 22:36:51 PDT 2020
Author: Chris Lattner
Date: 2020-03-12T22:36:42-07:00
New Revision: e0a93cea56ebfb98c4f3f4b073e6e382868fc34b
URL: https://github.com/llvm/llvm-project/commit/e0a93cea56ebfb98c4f3f4b073e6e382868fc34b
DIFF: https://github.com/llvm/llvm-project/commit/e0a93cea56ebfb98c4f3f4b073e6e382868fc34b.diff
LOG: incorporate feedback from River.
Added:
Modified:
mlir/lib/IR/AsmPrinter.cpp
Removed:
################################################################################
diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp
index b51760044294..bbb2462d176d 100644
--- a/mlir/lib/IR/AsmPrinter.cpp
+++ b/mlir/lib/IR/AsmPrinter.cpp
@@ -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 == ' ')
More information about the Mlir-commits
mailing list