aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/StringRef.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-12-18 20:30:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-04-19 21:23:40 +0000
commitbdbe302c3396ceb4dd89d1214485439598f05368 (patch)
treeccf66c6349b23061ed5e9645c21f15fbe718da8b /contrib/llvm-project/llvm/lib/Support/StringRef.cpp
parente7a1904fe1ced461b2a31f03b6592ae6564a243a (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/StringRef.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/StringRef.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/StringRef.cpp b/contrib/llvm-project/llvm/lib/Support/StringRef.cpp
index 3cce83a982c4..feee47ca693b 100644
--- a/contrib/llvm-project/llvm/lib/Support/StringRef.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/StringRef.cpp
@@ -388,17 +388,17 @@ static unsigned GetAutoSenseRadix(StringRef &Str) {
if (Str.empty())
return 10;
- if (Str.startswith("0x") || Str.startswith("0X")) {
+ if (Str.starts_with("0x") || Str.starts_with("0X")) {
Str = Str.substr(2);
return 16;
}
- if (Str.startswith("0b") || Str.startswith("0B")) {
+ if (Str.starts_with("0b") || Str.starts_with("0B")) {
Str = Str.substr(2);
return 2;
}
- if (Str.startswith("0o")) {
+ if (Str.starts_with("0o")) {
Str = Str.substr(2);
return 8;
}