diff options
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index c3fbda114e..52282e94f4 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -2445,6 +2445,12 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, if (Arch == llvm::Triple::spir || Arch == llvm::Triple::spir64) { Res.getDiagnosticOpts().Warnings.push_back("spir-compat"); } + + if ((LangOpts.C11 || LangOpts.C99 || LangOpts.CPlusPlus) && + (CodeGenOptions::FPC_On == Res.getCodeGenOpts().getFPContractMode()) && + !LangOpts.CUDA) + LangOpts.DefaultFPContract = 1; + return Success; } |