[flang-commits] [clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)
Shafik Yaghmour via flang-commits
flang-commits at lists.llvm.org
Thu Jun 5 13:08:21 PDT 2025
================
@@ -3167,3 +3167,29 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args,
options::OPT_fno_loop_interchange, EnableInterchange))
CmdArgs.push_back("-floop-interchange");
}
+
+std::optional<StringRef> tools::ParseMPreferVectorWidthOption(
+ clang::DiagnosticsEngine &Diags, const llvm::opt::ArgList &Args,
+ ArgStringList &CmdArgs, bool isCompilerDriver) {
+ // If this was invoked by the Compiler Driver, we pass through the option
+ // as-is. Otherwise, if this is the Frontend Driver, we want just the value.
+ StringRef Out = (isCompilerDriver) ? "-mprefer-vector-width=" : "";
----------------
shafik wrote:
```suggestion
StringRef Out = isCompilerDriver ? "-mprefer-vector-width=" : "";
```
https://github.com/llvm/llvm-project/pull/142800
More information about the flang-commits
mailing list