diff options
author | Tamas Berghammer <tberghammer@google.com> | 2015-07-13 10:50:55 +0000 |
---|---|---|
committer | Tamas Berghammer <tberghammer@google.com> | 2015-07-13 10:50:55 +0000 |
commit | c82c70b16952baef57048f9ecf981f0d05783548 (patch) | |
tree | 9095d211e70110e5fac04eb0f6c9f681a9bb171b | |
parent | 239b0f39285059b77d44b0f4d8be4db8b0d83599 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@242019 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | source/Core/DataExtractor.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/Core/DataExtractor.cpp b/source/Core/DataExtractor.cpp index 8c60a2282..861bece98 100644 --- a/source/Core/DataExtractor.cpp +++ b/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)) |