diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-12-06 11:04:33 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-06 11:16:39 +0100 |
| commit | fc39b94849c89843aebb210c5d9be9c48e2b43a6 (patch) | |
| tree | bec05caedf458bbd2ebee6afc6a562b142e8a91a /lldb/include | |
| parent | daee549b1756a7aa0f1560d5460ae580897e4c1a (diff) | |
| download | bcm5719-llvm-fc39b94849c89843aebb210c5d9be9c48e2b43a6.tar.gz bcm5719-llvm-fc39b94849c89843aebb210c5d9be9c48e2b43a6.zip | |
[lldb][NFC] Move [SU]Int64ValueIsValidForByteSize to RegisterValue
These functions are an implementation detail of RegisterValue, so
it doesn't make a lot of sense to implement them in a totally
unrelated class.
Diffstat (limited to 'lldb/include')
| -rw-r--r-- | lldb/include/lldb/Utility/Args.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/lldb/include/lldb/Utility/Args.h b/lldb/include/lldb/Utility/Args.h index 7987787e7af..1308f4038db 100644 --- a/lldb/include/lldb/Utility/Args.h +++ b/lldb/include/lldb/Utility/Args.h @@ -252,35 +252,6 @@ public: // For re-setting or blanking out the list of arguments. void Clear(); - static bool UInt64ValueIsValidForByteSize(uint64_t uval64, - size_t total_byte_size) { - if (total_byte_size > 8) - return false; - - if (total_byte_size == 8) - return true; - - const uint64_t max = (static_cast<uint64_t>(1) - << static_cast<uint64_t>(total_byte_size * 8)) - - 1; - return uval64 <= max; - } - - static bool SInt64ValueIsValidForByteSize(int64_t sval64, - size_t total_byte_size) { - if (total_byte_size > 8) - return false; - - if (total_byte_size == 8) - return true; - - const int64_t max = (static_cast<int64_t>(1) - << static_cast<uint64_t>(total_byte_size * 8 - 1)) - - 1; - const int64_t min = ~(max); - return min <= sval64 && sval64 <= max; - } - static lldb::Encoding StringToEncoding(llvm::StringRef s, lldb::Encoding fail_value = lldb::eEncodingInvalid); |

