We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19ea9b4 commit 87e529aCopy full SHA for 87e529a
mlir/tools/mlir-tblgen/OmpOpGen.cpp
@@ -49,11 +49,11 @@ static StringRef stripPrefixAndSuffix(StringRef str,
49
llvm::ArrayRef<StringRef> suffixes) {
50
for (StringRef prefix : prefixes)
51
if (str.starts_with(prefix))
52
- str = str.substr(prefix.size());
+ str = str.drop_front(prefix.size());
53
54
for (StringRef suffix : suffixes)
55
if (str.ends_with(suffix))
56
- str = str.substr(0, str.size() - suffix.size());
+ str = str.drop_back(suffix.size());
57
58
return str;
59
}
0 commit comments