From 30e7ee3c4bac4a12ea584a879aa320bd4e035cc2 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 18 Nov 2019 10:45:23 -0800 Subject: Temporarily Revert "Add support for options -frounding-math, ftrapping-math, -ffp-model=, and -ffp-exception-behavior=" and a follow-up NFC rearrangement as it's causing a crash on valid. Testcase is on the original review thread. This reverts commits af57dbf12e54f3a8ff48534bf1078f4de104c1cd and e6584b2b7b2de06f1e59aac41971760cac1e1b79 --- clang/lib/Frontend/CompilerInvocation.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 26221a89818..79975722a47 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3148,36 +3148,6 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val; } - if (Args.hasArg(OPT_frounding_math)) { - Opts.setFPRoundingMode(LangOptions::FPR_Dynamic); - } - - if (Args.hasArg(OPT_fno_rounding_math)) { - Opts.setFPRoundingMode(LangOptions::FPR_ToNearest); - } - - 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.2.3