================
@@ -203,6 +203,14 @@ void Flang::addCodegenOptions(const ArgList &Args,
       !stackArrays->getOption().matches(options::OPT_fno_stack_arrays))
     CmdArgs.push_back("-fstack-arrays");
 
+  // -fno-protect-parens is the default for -Ofast.
+  if (Args.hasFlag(options::OPT_fprotect_parens,
+                   options::OPT_fno_protect_parens,
+                   /*Default=*/!Args.hasArg(options::OPT_Ofast)))
+    CmdArgs.push_back("-fprotect-parens");
+  else
----------------
alexey-bataev wrote:

Do we really need -fprotect-parens for the frontend? IIRC, the logic must be 
that it is enabled by default and only can be disabled

https://github.com/llvm/llvm-project/pull/170505
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to