[Lldb-commits] [lldb] r242019 - Remove hack about the size of long doubles from DataExtractor
Tamas Berghammer
tberghammer at google.com
Mon Jul 13 03:50:55 PDT 2015
Author: tberghammer
Date: Mon Jul 13 05:50:55 2015
New Revision: 242019
URL: http://llvm.org/viewvc/llvm-project?rev=242019&view=rev
Log:
Remove hack about the size of long doubles from DataExtractor
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
Modified:
lldb/trunk/source/Core/DataExtractor.cpp
Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=242019&r1=242018&r2=242019&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Mon Jul 13 05:50:55 2015
@@ -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))
More information about the lldb-commits
mailing list