summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-01-03 02:46:46 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-01-03 02:46:46 +0000
commit3a5ff5cbd21e5f853a2f1c796090ffa9e364836e (patch)
tree551a263b77772587a2ced6766a144dfae63b33e7 /clang/lib/Frontend/InitPreprocessor.cpp
parentcbcc98fb50f5b110a1c0f13fe475832a5c7a3866 (diff)
downloadbcm5719-llvm-3a5ff5cbd21e5f853a2f1c796090ffa9e364836e.tar.gz
bcm5719-llvm-3a5ff5cbd21e5f853a2f1c796090ffa9e364836e.zip
Teach the frontend to provide the builtin preprocessor defines for
-ffast-math. llvm-svn: 147440
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index f601f3d73ab..74c2ec90ece 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -411,6 +411,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
if (LangOpts.OptimizeSize)
Builder.defineMacro("__OPTIMIZE_SIZE__");
+ if (LangOpts.FastMath)
+ Builder.defineMacro("__FAST_MATH__");
+
// Initialize target-specific preprocessor defines.
// Define type sizing macros based on the target properties.
OpenPOWER on IntegriCloud