diff options
| author | Greg Clayton <gclayton@apple.com> | 2013-06-11 21:56:55 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2013-06-11 21:56:55 +0000 |
| commit | bc8fc0f5e0c00d2d09840c615b145e2e2ab35fb7 (patch) | |
| tree | 8836f4247c0ff0ef565833b3aaafe4ffb43a1f08 /lldb/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp | |
| parent | 1f16b743d9255f5f75a85c52e3a02d04b4a1e590 (diff) | |
| download | bcm5719-llvm-bc8fc0f5e0c00d2d09840c615b145e2e2ab35fb7.tar.gz bcm5719-llvm-bc8fc0f5e0c00d2d09840c615b145e2e2ab35fb7.zip | |
Use llvm::APFloat for formatting if a target is available. Each target when debugging has a "ASTContext" that helps us to use the correct floating point semantics. Now that APFloat supports toString we now use that. If we don't have a target, we still fall back on the old display methodology, but the important formatting should always have a target available and thus use the compiler floating point code.
Modified the test programs to use floating point constants that always will display correctly. We had some numbers that were being rounded, and now that we are using clang, we no longer round them and we get more correct results.
llvm-svn: 183792
Diffstat (limited to 'lldb/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp')
| -rw-r--r-- | lldb/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp b/lldb/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp index 24ee5be9e9c..9279e414be3 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp +++ b/lldb/test/functionalities/data-formatter/data-formatter-smart-array/main.cpp @@ -36,12 +36,12 @@ struct SomeOtherData intarr[4] = 5; flarr[0] = 25.5; - flarr[1] = 25.7; - flarr[2] = 25.9; - flarr[3] = 26.4; - flarr[4] = 27.1; - flarr[5] = 27.3; - flarr[6] = 26.9; + flarr[1] = 25.25; + flarr[2] = 25.125; + flarr[3] = 26.75; + flarr[4] = 27.375; + flarr[5] = 27.5; + flarr[6] = 26.125; } }; @@ -51,7 +51,7 @@ int main (int argc, const char * argv[]) char *strptr = NULL; strptr = "Hello world!"; int intarr[5] = {1,1,2,3,5}; - float flarr[7] = {78.5,77.4,78.0,76.1,76.7,76.8,77.0}; + float flarr[7] = {78.5,77.25,78.0,76.125,76.75,76.875,77.0}; SomeData data; |

