aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-12-16 10:14:44 -0800
committerKazu Hirata <kazu@google.com>2023-12-16 10:14:44 -0800
commit395f9ce30e884cb6ce02f7a3bdd0dd1f72ea9033 (patch)
tree5f9a34fa18423256e94f094e47863a05e9b88181 /llvm/lib/IR
parentf49e2b05bf3ececa2fe20c5d658ab92ab974dc36 (diff)
downloadllvm-395f9ce30e884cb6ce02f7a3bdd0dd1f72ea9033.zip
llvm-395f9ce30e884cb6ce02f7a3bdd0dd1f72ea9033.tar.gz
llvm-395f9ce30e884cb6ce02f7a3bdd0dd1f72ea9033.tar.bz2
Use StringRef::{starts,ends}_with (NFC)
This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with.
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/AutoUpgrade.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 738ec30..6b54047 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -5220,7 +5220,7 @@ std::string llvm::UpgradeDataLayoutString(StringRef DL, StringRef TT) {
Res.append("-p7:160:256:256:32");
if (!DL.contains("-p8") && !DL.starts_with("p8"))
Res.append("-p8:128:128");
- if (!DL.contains("-p9") && !DL.startswith("p9"))
+ if (!DL.contains("-p9") && !DL.starts_with("p9"))
Res.append("-p9:192:256:256:32");
return Res;