[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 1 05:42:22 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 1d4523505e54415a270d7b13b6e203fc25585c5b eaad187a5e1372cc34f79f36ca5d28016a94b221 -- clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Driver/ToolChains/CommonArgs.cpp clang/lib/Driver/ToolChains/CommonArgs.h clang/lib/Driver/ToolChains/Flang.cpp flang/include/flang/Frontend/CodeGenOptions.h flang/lib/Frontend/CodeGenOptions.cpp flang/lib/Frontend/CompilerInstance.cpp flang/lib/Frontend/CompilerInvocation.cpp flang/lib/Frontend/FrontendActions.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 2fd2ac3244..eddfa5029d 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -395,15 +395,16 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts,
<< a->getAsString(args) << modelName;
}
- if (const llvm::opt::Arg *arg = args.getLastArg(clang::driver::options::OPT_mlarge_data_threshold_EQ)) {
+ if (const llvm::opt::Arg *arg = args.getLastArg(
+ clang::driver::options::OPT_mlarge_data_threshold_EQ)) {
uint64_t LDT;
if (llvm::StringRef(arg->getValue()).getAsInteger(/*Radix=*/10, LDT)) {
diags.Report(clang::diag::err_drv_invalid_value)
<< arg->getSpelling() << arg->getValue();
- }
+ }
opts.LargeDataThreshold = LDT;
}
-
+
// This option is compatible with -f[no-]underscoring in gfortran.
if (args.hasFlag(clang::driver::options::OPT_fno_underscoring,
clang::driver::options::OPT_funderscoring, false)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/95411
More information about the cfe-commits
mailing list