diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2013-05-18 20:47:36 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2013-05-18 20:47:36 +0000 |
| commit | 0d4b9e61de736ec7c0e315558dbdac2a8b9e7e72 (patch) | |
| tree | 9b4b2a629bbc9c0ca9f553c655e11de6dbc42188 /clang/docs | |
| parent | 40746dfe8f2a1036da2726d9ee36578837559528 (diff) | |
| download | bcm5719-llvm-0d4b9e61de736ec7c0e315558dbdac2a8b9e7e72.tar.gz bcm5719-llvm-0d4b9e61de736ec7c0e315558dbdac2a8b9e7e72.zip | |
Fix a logic bug in the handling of -fmath-errno in the driver. We would
imply -fno-math-errno if the user passed -fno-fast-math OR -ffast-math,
regardless of in which order and regardless of the tool chain default.
I've fixed this to follow the logic:
1) If the last dominating flag is -fno-math-errno, -ffast-math, or
-Ofast, then do not use math-errno.
2) If the last dominating flag is an explicit -fmath-errno, do use
math-errno.
3) Otherwise, use the toolchain default.
This, for example, allows the flag sequence
'-ffast-math ... -fno-fast-math' with no mention of '-fmath-errno' or
'-fno-math-errno' to preserve the toolchain default. Most notably, this
should prevent users trying to disable fast-math optimizations on Darwin
and BSD platforms from simultaneously enabling (pointless) -fmath-errno.
I've enhanced the tests (after more reorganization) to cover this and
other weird permutations of flags and targets.
llvm-svn: 182203
Diffstat (limited to 'clang/docs')
0 files changed, 0 insertions, 0 deletions

