================
@@ -213,6 +214,19 @@ void riscv::getRISCVTargetFeatures(const Driver &D, const 
llvm::Triple &Triple,
   for (const std::string &TF : TuneFeatures)
     Features.push_back(Args.MakeArgString(TF));
 
+  if (Args.getLastArg(options::OPT_msave_restore)) {
+    auto FCFArgVal = Args.getLastArgValue(options::OPT_fcf_protection_EQ);
+    if (Args.hasArg(options::OPT_fcf_protection) || FCFArgVal == "return" ||
+        FCFArgVal == "full")
----------------
nemanjai wrote:

Doesn't `Args.getLastArg(options::OPT_msave_restore)` only return `true` if the 
last (winning) argument is `-msave-restore`?

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

Reply via email to