aboutsummaryrefslogtreecommitdiffstats
path: root/source/Utility/StringExtractor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Utility/StringExtractor.cpp')
-rw-r--r--source/Utility/StringExtractor.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/source/Utility/StringExtractor.cpp b/source/Utility/StringExtractor.cpp
index 502f468da3cc..87fe4f13e450 100644
--- a/source/Utility/StringExtractor.cpp
+++ b/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);