[Mlir-commits] [mlir] 9264728 - [mlir] Rename StringRef _lower() method calls to _insensitive()

Martin Storsjö llvmlistbot at llvm.org
Thu Jun 24 14:23:39 PDT 2021


Author: Martin Storsjö
Date: 2021-06-25T00:22:01+03:00
New Revision: 9264728450c350a3e581e9914c4a26ddccdba0d1

URL: https://github.com/llvm/llvm-project/commit/9264728450c350a3e581e9914c4a26ddccdba0d1
DIFF: https://github.com/llvm/llvm-project/commit/9264728450c350a3e581e9914c4a26ddccdba0d1.diff

LOG: [mlir] Rename StringRef _lower() method calls to _insensitive()

Added: 
    

Modified: 
    mlir/test/lib/Dialect/Test/TestTypes.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/test/lib/Dialect/Test/TestTypes.cpp b/mlir/test/lib/Dialect/Test/TestTypes.cpp
index 69818203c5696..96cfd4cd66ac6 100644
--- a/mlir/test/lib/Dialect/Test/TestTypes.cpp
+++ b/mlir/test/lib/Dialect/Test/TestTypes.cpp
@@ -31,11 +31,14 @@ parseSignedness(DialectAsmParser &parser,
   auto loc = parser.getCurrentLocation();
   if (parser.parseKeyword(&signStr))
     return failure();
-  if (signStr.compare_lower("u") || signStr.compare_lower("unsigned"))
+  if (signStr.compare_insensitive("u") ||
+      signStr.compare_insensitive("unsigned"))
     result = TestIntegerType::SignednessSemantics::Unsigned;
-  else if (signStr.compare_lower("s") || signStr.compare_lower("signed"))
+  else if (signStr.compare_insensitive("s") ||
+           signStr.compare_insensitive("signed"))
     result = TestIntegerType::SignednessSemantics::Signed;
-  else if (signStr.compare_lower("n") || signStr.compare_lower("none"))
+  else if (signStr.compare_insensitive("n") ||
+           signStr.compare_insensitive("none"))
     result = TestIntegerType::SignednessSemantics::Signless;
   else
     return parser.emitError(loc, "expected signed, unsigned, or none");


        


More information about the Mlir-commits mailing list