diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
commit | f73363f1dd94996356cefbf24388f561891acf0b (patch) | |
tree | e3c31248bdb36eaec5fd833490d4278162dba2a0 /source/Core/DumpDataExtractor.cpp | |
parent | 160ee69dd7ae18978f4068116777639ea98dc951 (diff) | |
download | src-f73363f1dd94996356cefbf24388f561891acf0b.tar.gz src-f73363f1dd94996356cefbf24388f561891acf0b.zip |
Vendor import of lldb trunk r338150:vendor/lldb/lldb-trunk-r338150
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=336823
svn path=/vendor/lldb/lldb-trunk-r338150/; revision=336824; tag=vendor/lldb/lldb-trunk-r338150
Diffstat (limited to 'source/Core/DumpDataExtractor.cpp')
-rw-r--r-- | source/Core/DumpDataExtractor.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/Core/DumpDataExtractor.cpp b/source/Core/DumpDataExtractor.cpp index e564e86478fc..049f4d3805a1 100644 --- a/source/Core/DumpDataExtractor.cpp +++ b/source/Core/DumpDataExtractor.cpp @@ -239,8 +239,8 @@ lldb::offset_t lldb_private::DumpDataExtractor( if (item_byte_size <= 8) { uint64_t uval64 = DE.GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset); - // Avoid std::bitset<64>::to_string() since it is missing in - // earlier C++ libraries + // Avoid std::bitset<64>::to_string() since it is missing in earlier + // C++ libraries std::string binary_value(64, '0'); std::bitset<64> bits(uval64); for (uint32_t i = 0; i < 64; ++i) @@ -263,8 +263,8 @@ lldb::offset_t lldb_private::DumpDataExtractor( s->Printf("%2.2x", DE.GetU8(&offset)); } - // Put an extra space between the groups of bytes if more than one - // is being dumped in a group (item_byte_size is more than 1). + // Put an extra space between the groups of bytes if more than one is + // being dumped in a group (item_byte_size is more than 1). if (item_byte_size > 1) s->PutChar(' '); break; @@ -279,8 +279,7 @@ lldb::offset_t lldb_private::DumpDataExtractor( return offset; } - // If we are only printing one character surround it with single - // quotes + // If we are only printing one character surround it with single quotes if (item_count == 1 && item_format == eFormatChar) s->PutChar('\''); @@ -583,8 +582,10 @@ lldb::offset_t lldb_private::DumpDataExtractor( } else if (item_bit_size == ast->getTypeSize(ast->LongDoubleTy)) { const auto &semantics = ast->getFloatTypeSemantics(ast->LongDoubleTy); - const auto byte_size = - (llvm::APFloat::getSizeInBits(semantics) + 7) / 8; + + offset_t byte_size = item_byte_size; + if (&semantics == &llvm::APFloatBase::x87DoubleExtended()) + byte_size = (llvm::APFloat::getSizeInBits(semantics) + 7) / 8; llvm::APInt apint; if (GetAPInt(DE, &offset, byte_size, apint)) { @@ -691,10 +692,9 @@ lldb::offset_t lldb_private::DumpDataExtractor( break; // please keep the single-item formats below in sync with - // FormatManager::GetSingleItemFormat - // if you fail to do so, users will start getting different outputs - // depending on internal - // implementation details they should not care about || + // FormatManager::GetSingleItemFormat if you fail to do so, users will + // start getting different outputs depending on internal implementation + // details they should not care about || case eFormatVectorOfChar: // || s->PutChar('{'); // \/ offset = |