aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorEugene Epshteyn <59377284+eugeneepshteyn@users.noreply.github.com>2025-02-04 20:50:01 -0500
committerGitHub <noreply@github.com>2025-02-04 20:50:01 -0500
commit642288247d0eb59069797f15cdd0f51b41d558c6 (patch)
treec2cd5547b5d1edd148fa2426a0c4f25e45a034d3 /flang/lib/Frontend/CompilerInvocation.cpp
parent5f247e76dfa69d487b82d58c05ef7a68bcc602c9 (diff)
downloadllvm-642288247d0eb59069797f15cdd0f51b41d558c6.zip
llvm-642288247d0eb59069797f15cdd0f51b41d558c6.tar.gz
llvm-642288247d0eb59069797f15cdd0f51b41d558c6.tar.bz2
[flang] Add support for -fimplicit-none-ext option (#125248)
When -fimplicit-none-ext is passed, flang behaves as if "implicit none(external)" was specified for all relevant constructs in Fortran source file. Note: implicit17.f90 was based on implicit07.f90 with `implicit none(external)` removed and `-fimplicit-none-ext` added.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 68b5950..a2c1d3e 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -740,6 +740,12 @@ static bool parseFrontendArgs(FrontendOptions &opts, llvm::opt::ArgList &args,
args.hasFlag(clang::driver::options::OPT_fimplicit_none,
clang::driver::options::OPT_fno_implicit_none, false));
+ // -f{no-}implicit-none-ext
+ opts.features.Enable(
+ Fortran::common::LanguageFeature::ImplicitNoneExternal,
+ args.hasFlag(clang::driver::options::OPT_fimplicit_none_ext,
+ clang::driver::options::OPT_fno_implicit_none_ext, false));
+
// -f{no-}backslash
opts.features.Enable(Fortran::common::LanguageFeature::BackslashEscapes,
args.hasFlag(clang::driver::options::OPT_fbackslash,