summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/StringExtractor.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-06-22 21:28:05 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-06-22 21:28:05 +0000
commit1e89cd804c9fb8d00e898c86580f55e075e54d18 (patch)
tree8adafa7e9162068a9b1adbb5753ffb4b047dad63 /lldb/source/Utility/StringExtractor.cpp
parentb328d72d77db1c54e3120ad88e546e393687538b (diff)
downloadbcm5719-llvm-1e89cd804c9fb8d00e898c86580f55e075e54d18.tar.gz
bcm5719-llvm-1e89cd804c9fb8d00e898c86580f55e075e54d18.zip
Avoid tolower, it's slow and unnecessary.
llvm-svn: 106580
Diffstat (limited to 'lldb/source/Utility/StringExtractor.cpp')
-rw-r--r--lldb/source/Utility/StringExtractor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Utility/StringExtractor.cpp b/lldb/source/Utility/StringExtractor.cpp
index d2f69f95b7c..86cd623f55c 100644
--- a/lldb/source/Utility/StringExtractor.cpp
+++ b/lldb/source/Utility/StringExtractor.cpp
@@ -17,18 +17,20 @@
static inline int
xdigit_to_sint (char ch)
{
- ch = tolower(ch);
if (ch >= 'a' && ch <= 'f')
return 10 + ch - 'a';
+ if (ch >= 'A' && ch <= 'F')
+ return 10 + ch - 'A';
return ch - '0';
}
static inline unsigned int
xdigit_to_uint (uint8_t ch)
{
- ch = tolower(ch);
if (ch >= 'a' && ch <= 'f')
return 10u + ch - 'a';
+ if (ch >= 'A' && ch <= 'F')
+ return 10u + ch - 'A';
return ch - '0';
}
OpenPOWER on IntegriCloud