From 6a039161d7b61ae69380e049f314eabb702372b9 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Thu, 19 Jul 2012 03:52:53 +0000 Subject: 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 . Patch by Michael Gottesman! llvm-svn: 160491 --- clang/lib/Frontend/CompilerInvocation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 016783b1dc5..544c0a270a0 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2100,6 +2100,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.NoInlineDefine = !Opt || Args.hasArg(OPT_fno_inline); Opts.FastMath = Args.hasArg(OPT_ffast_math); + Opts.FiniteMathOnly = Args.hasArg(OPT_ffinite_math_only); unsigned SSP = Args.getLastArgIntValue(OPT_stack_protector, 0, Diags); switch (SSP) { -- cgit v1.2.3