diff options
author | Kazu Hirata <kazu@google.com> | 2024-06-01 10:36:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-01 10:36:05 -0700 |
commit | 2a1ea151cccba3de21edb950099a75ca8d3ea604 (patch) | |
tree | 2c8431891117236f9d65b3254195bf997dad1d34 /llvm/lib/MC | |
parent | 8256c593f67018e8d73dce714bedc3f4e6869db9 (diff) | |
download | llvm-2a1ea151cccba3de21edb950099a75ca8d3ea604.zip llvm-2a1ea151cccba3de21edb950099a75ca8d3ea604.tar.gz llvm-2a1ea151cccba3de21edb950099a75ca8d3ea604.tar.bz2 |
Use StringRef::starts_with (NFC) (#94112)
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index bbee2a6..b065d03 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -76,7 +76,7 @@ void MCExpr::print(raw_ostream &OS, const MCAsmInfo *MAI, bool InParens) const { // Parenthesize names that start with $ so that they don't look like // absolute names. bool UseParens = MAI && MAI->useParensForDollarSignNames() && !InParens && - !Sym.getName().empty() && Sym.getName()[0] == '$'; + Sym.getName().starts_with('$'); if (UseParens) { OS << '('; |