From 5412913631feef74f7d52c092e947227c1cc7b04 Mon Sep 17 00:00:00 2001 From: Melanie Blower Date: Wed, 4 Dec 2019 12:21:23 -0800 Subject: Revert " Reapply af57dbf12e54 "Add support for options -frounding-math, ftrapping-math, -ffp-model=, and -ffp-exception-behavior="" This reverts commit cdbed2dd856c14687efd741c2d8321686102acb8. Build break on Windows (lit fail) --- clang/lib/Frontend/CompilerInvocation.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 198ae69b7..74831e7 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3145,34 +3145,6 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val; } - LangOptions::FPRoundingModeKind FPRM = LangOptions::FPR_ToNearest; - if (Args.hasArg(OPT_frounding_math)) { - FPRM = LangOptions::FPR_Dynamic; - } - Opts.setFPRoundingMode(FPRM); - - if (Args.hasArg(OPT_ftrapping_math)) { - Opts.setFPExceptionMode(LangOptions::FPE_Strict); - } - - if (Args.hasArg(OPT_fno_trapping_math)) { - Opts.setFPExceptionMode(LangOptions::FPE_Ignore); - } - - LangOptions::FPExceptionModeKind FPEB = LangOptions::FPE_Ignore; - if (Arg *A = Args.getLastArg(OPT_ffp_exception_behavior_EQ)) { - StringRef Val = A->getValue(); - if (Val.equals("ignore")) - FPEB = LangOptions::FPE_Ignore; - else if (Val.equals("maytrap")) - FPEB = LangOptions::FPE_MayTrap; - else if (Val.equals("strict")) - FPEB = LangOptions::FPE_Strict; - else - Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val; - } - Opts.setFPExceptionMode(FPEB); - Opts.RetainCommentsFromSystemHeaders = Args.hasArg(OPT_fretain_comments_from_system_headers); -- cgit v1.1