[llvm] bd488c1 - [RISCV] Use StringRef::starts_with(char) instead of starts_with(StringRef). NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 23:11:45 PDT 2024
Author: Craig Topper
Date: 2024-06-24T23:03:08-07:00
New Revision: bd488c1247715f8d698b9b26611ff7f869c824cc
URL: https://github.com/llvm/llvm-project/commit/bd488c1247715f8d698b9b26611ff7f869c824cc
DIFF: https://github.com/llvm/llvm-project/commit/bd488c1247715f8d698b9b26611ff7f869c824cc.diff
LOG: [RISCV] Use StringRef::starts_with(char) instead of starts_with(StringRef). NFC
Added:
Modified:
llvm/lib/TargetParser/RISCVISAInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/TargetParser/RISCVISAInfo.cpp b/llvm/lib/TargetParser/RISCVISAInfo.cpp
index 258238bfb212d..35bfc31c79c0e 100644
--- a/llvm/lib/TargetParser/RISCVISAInfo.cpp
+++ b/llvm/lib/TargetParser/RISCVISAInfo.cpp
@@ -177,21 +177,21 @@ bool RISCVISAInfo::addExtension(StringRef ExtName,
}
static StringRef getExtensionTypeDesc(StringRef Ext) {
- if (Ext.starts_with("s"))
+ if (Ext.starts_with('s'))
return "standard supervisor-level extension";
- if (Ext.starts_with("x"))
+ if (Ext.starts_with('x'))
return "non-standard user-level extension";
- if (Ext.starts_with("z"))
+ if (Ext.starts_with('z'))
return "standard user-level extension";
return StringRef();
}
static StringRef getExtensionType(StringRef Ext) {
- if (Ext.starts_with("s"))
+ if (Ext.starts_with('s'))
return "s";
- if (Ext.starts_with("x"))
+ if (Ext.starts_with('x'))
return "x";
- if (Ext.starts_with("z"))
+ if (Ext.starts_with('z'))
return "z";
return StringRef();
}
More information about the llvm-commits
mailing list