summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/StringExtractor.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-21 04:55:53 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-21 04:55:53 +0000
commit7483005c59828482aa28e09c7a132628b4054e29 (patch)
tree1052f47967979c57b606077723fe4b1678b28845 /lldb/source/Utility/StringExtractor.cpp
parentdc333e6398edd49705cf56bc9440f63c707f6300 (diff)
downloadbcm5719-llvm-7483005c59828482aa28e09c7a132628b4054e29.tar.gz
bcm5719-llvm-7483005c59828482aa28e09c7a132628b4054e29.zip
[NFC] Remove unused function GetHexWithFixedSize
The implementation of this function was obviously incorrect, as the result variable was never used. This led me to check if it was actually used anywhere, which came back negative. llvm-svn: 369492
Diffstat (limited to 'lldb/source/Utility/StringExtractor.cpp')
-rw-r--r--lldb/source/Utility/StringExtractor.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/lldb/source/Utility/StringExtractor.cpp b/lldb/source/Utility/StringExtractor.cpp
index 502f468da3c..87fe4f13e45 100644
--- a/lldb/source/Utility/StringExtractor.cpp
+++ b/lldb/source/Utility/StringExtractor.cpp
@@ -296,34 +296,6 @@ size_t StringExtractor::GetHexBytesAvail(llvm::MutableArrayRef<uint8_t> dest) {
return bytes_extracted;
}
-// Consume ASCII hex nibble character pairs until we have decoded byte_size
-// bytes of data.
-
-uint64_t StringExtractor::GetHexWithFixedSize(uint32_t byte_size,
- bool little_endian,
- uint64_t fail_value) {
- if (byte_size <= 8 && GetBytesLeft() >= byte_size * 2) {
- uint64_t result = 0;
- uint32_t i;
- if (little_endian) {
- // Little Endian
- uint32_t shift_amount;
- for (i = 0, shift_amount = 0; i < byte_size && IsGood();
- ++i, shift_amount += 8) {
- result |= (static_cast<uint64_t>(GetHexU8()) << shift_amount);
- }
- } else {
- // Big Endian
- for (i = 0; i < byte_size && IsGood(); ++i) {
- result <<= 8;
- result |= GetHexU8();
- }
- }
- }
- m_index = UINT64_MAX;
- return fail_value;
-}
-
size_t StringExtractor::GetHexByteString(std::string &str) {
str.clear();
str.reserve(GetBytesLeft() / 2);
OpenPOWER on IntegriCloud