Skip to content

Commit

Permalink
Remove hack about the size of long doubles from DataExtractor
Browse files Browse the repository at this point in the history
The size of a long double was hardcoded in DataExtractor for x86 and
x86_64 architectures. This CL removes the hard coded values and use the
actual size based on the floating point semantics specified.

Differential revision: http://reviews.llvm.org/D8417

llvm-svn: 242019
  • Loading branch information
Tamas Berghammer committed Jul 13, 2015
1 parent 77dc956 commit 5f0bc1a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lldb/source/Core/DataExtractor.cpp
Expand Up @@ -1830,10 +1830,8 @@ DataExtractor::Dump (Stream *s,
}
else if (item_bit_size == ast->getTypeSize(ast->LongDoubleTy))
{
auto byte_size = item_byte_size;
const auto &semantics = ast->getFloatTypeSemantics(ast->LongDoubleTy);
if (&semantics == &llvm::APFloat::x87DoubleExtended)
byte_size = 10;
const auto byte_size = (llvm::APFloat::getSizeInBits(semantics) + 7) / 8;

llvm::APInt apint;
if (GetAPInt(*this, &offset, byte_size, apint))
Expand Down

0 comments on commit 5f0bc1a

Please sign in to comment.