summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/DataExtractor.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-07-13 10:50:55 +0000
committerTamas Berghammer <tberghammer@google.com>2015-07-13 10:50:55 +0000
commit5f0bc1a859171d4df85d96f43e17fe950b875c95 (patch)
treec61f808693c5d5b7a682112a29d0f5cef136441d /lldb/source/Core/DataExtractor.cpp
parent77dc9569c6304c4b2a0a012ae327010ecd3e5067 (diff)
downloadbcm5719-llvm-5f0bc1a859171d4df85d96f43e17fe950b875c95.tar.gz
bcm5719-llvm-5f0bc1a859171d4df85d96f43e17fe950b875c95.zip
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 llvm-svn: 242019
Diffstat (limited to 'lldb/source/Core/DataExtractor.cpp')
-rw-r--r--lldb/source/Core/DataExtractor.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp
index 8c60a22821e..861bece98da 100644
--- a/lldb/source/Core/DataExtractor.cpp
+++ b/lldb/source/Core/DataExtractor.cpp
@@ -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))
OpenPOWER on IntegriCloud