Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.
This macro was being unconditionally set to zero, preceded by a FIXME comment. This fixes <rdar://problem/11845441>. Patch by Michael Gottesman! llvm-svn: 160491
This commit is contained in:
@@ -527,9 +527,10 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
|
||||
if (const char *Prefix = TI.getUserLabelPrefix())
|
||||
Builder.defineMacro("__USER_LABEL_PREFIX__", Prefix);
|
||||
|
||||
// Build configuration options. FIXME: these should be controlled by
|
||||
// command line options or something.
|
||||
Builder.defineMacro("__FINITE_MATH_ONLY__", "0");
|
||||
if (LangOpts.FastMath || LangOpts.FiniteMathOnly)
|
||||
Builder.defineMacro("__FINITE_MATH_ONLY__", "1");
|
||||
else
|
||||
Builder.defineMacro("__FINITE_MATH_ONLY__", "0");
|
||||
|
||||
if (LangOpts.GNUInline)
|
||||
Builder.defineMacro("__GNUC_GNU_INLINE__");
|
||||
|
||||
Reference in New Issue
Block a user