summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-05-18 20:47:36 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-05-18 20:47:36 +0000
commitb69557ed6f6d5063705e60f771a612aa62ec6b22 (patch)
treeba52442763ed6a4f43444054b1ca22523488557a /lib/CodeGen/CGExprAgg.cpp
parentedc313343dc64c3113f01ea7cf902465e7c1da55 (diff)
downloadclang-b69557ed6f6d5063705e60f771a612aa62ec6b22.tar.gz
clang-b69557ed6f6d5063705e60f771a612aa62ec6b22.tar.bz2
clang-b69557ed6f6d5063705e60f771a612aa62ec6b22.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
0 files changed, 0 insertions, 0 deletions