diff options
author | Craig Topper <craig.topper@sifive.com> | 2024-06-24 22:13:28 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2024-06-24 23:03:08 -0700 |
commit | bd488c1247715f8d698b9b26611ff7f869c824cc (patch) | |
tree | 3ba97dcc282b84e164a87e58b4de728e2d5ed280 | |
parent | 8348d720ef913b0ff92b468be2eb9f4ea273cb5a (diff) | |
download | llvm-bd488c1247715f8d698b9b26611ff7f869c824cc.zip llvm-bd488c1247715f8d698b9b26611ff7f869c824cc.tar.gz llvm-bd488c1247715f8d698b9b26611ff7f869c824cc.tar.bz2 |
[RISCV] Use StringRef::starts_with(char) instead of starts_with(StringRef). NFC
-rw-r--r-- | llvm/lib/TargetParser/RISCVISAInfo.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/TargetParser/RISCVISAInfo.cpp b/llvm/lib/TargetParser/RISCVISAInfo.cpp index 258238b..35bfc31 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(); } |