aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorIlia Kuklin <ikuklin@accesssoftek.com>2025-08-07 22:48:17 +0500
committerGitHub <noreply@github.com>2025-08-07 22:48:17 +0500
commit2ff44d7d658beca1724f04211e194bf4beb2a1a0 (patch)
treeb2a805f7c681f5f48ebfe79c2008d5cd711d85b0 /llvm/lib
parent06f06deb774ada5aa37db89fa7b4a88b13163e0d (diff)
downloadllvm-2ff44d7d658beca1724f04211e194bf4beb2a1a0.zip
llvm-2ff44d7d658beca1724f04211e194bf4beb2a1a0.tar.gz
llvm-2ff44d7d658beca1724f04211e194bf4beb2a1a0.tar.bz2
[ADT] Make `getAutoSenseRadix` in `StringRef` global (#152503)
Needed in #152308
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/StringRef.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp
index dc75878..b6a2f8a 100644
--- a/llvm/lib/Support/StringRef.cpp
+++ b/llvm/lib/Support/StringRef.cpp
@@ -385,7 +385,7 @@ size_t StringRef::count(StringRef Str) const {
return Count;
}
-static unsigned GetAutoSenseRadix(StringRef &Str) {
+unsigned llvm::getAutoSenseRadix(StringRef &Str) {
if (Str.empty())
return 10;
@@ -410,7 +410,7 @@ bool llvm::consumeUnsignedInteger(StringRef &Str, unsigned Radix,
unsigned long long &Result) {
// Autosense radix if not specified.
if (Radix == 0)
- Radix = GetAutoSenseRadix(Str);
+ Radix = getAutoSenseRadix(Str);
// Empty strings (after the radix autosense) are invalid.
if (Str.empty()) return true;
@@ -509,7 +509,7 @@ bool StringRef::consumeInteger(unsigned Radix, APInt &Result) {
// Autosense radix if not specified.
if (Radix == 0)
- Radix = GetAutoSenseRadix(Str);
+ Radix = getAutoSenseRadix(Str);
assert(Radix > 1 && Radix <= 36);