diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
| commit | 145449b1e420787bb99721a429341fa6be3adfb6 (patch) | |
| tree | 1d56ae694a6de602e348dd80165cf881a36600ed /lldb/source/Core/DumpDataExtractor.cpp | |
| parent | ecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff) | |
Diffstat (limited to 'lldb/source/Core/DumpDataExtractor.cpp')
| -rw-r--r-- | lldb/source/Core/DumpDataExtractor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Core/DumpDataExtractor.cpp b/lldb/source/Core/DumpDataExtractor.cpp index 211e16a2e033..4ef1df1aeb0f 100644 --- a/lldb/source/Core/DumpDataExtractor.cpp +++ b/lldb/source/Core/DumpDataExtractor.cpp @@ -118,7 +118,7 @@ static lldb::offset_t DumpAPInt(Stream *s, const DataExtractor &data, lldb::offset_t offset, lldb::offset_t byte_size, bool is_signed, unsigned radix) { llvm::Optional<llvm::APInt> apint = GetAPInt(data, &offset, byte_size); - if (apint.hasValue()) { + if (apint) { std::string apint_str = toString(apint.getValue(), radix, is_signed); switch (radix) { case 2: @@ -670,7 +670,7 @@ lldb::offset_t lldb_private::DumpDataExtractor( (llvm::APFloat::getSizeInBits(semantics) + 7) / 8; llvm::Optional<llvm::APInt> apint = GetAPInt(DE, &offset, semantics_byte_size); - if (apint.hasValue()) { + if (apint) { llvm::APFloat apfloat(semantics, apint.getValue()); apfloat.toString(sv, format_precision, format_max_padding); if (!sv.empty()) { |
