aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>2024-09-26 08:56:22 -0500
committerGitHub <noreply@github.com>2024-09-26 08:56:22 -0500
commit3b20a833cb4d701ff9d61aca2120d125b618950f (patch)
tree4b6eddbafbd86d0f47e7f8a689b81f900ffa2c19 /flang/lib/Frontend/CompilerInvocation.cpp
parent58e8683a31186a281d83499798aa5f867b4c5894 (diff)
downloadllvm-3b20a833cb4d701ff9d61aca2120d125b618950f.zip
llvm-3b20a833cb4d701ff9d61aca2120d125b618950f.tar.gz
llvm-3b20a833cb4d701ff9d61aca2120d125b618950f.tar.bz2
[flang][Semantics] Add LangOptions to SemanticsContext (#110013)
The motivation for this is to make OpenMP settings visible in the semantic checks (OpenMP version in particular).
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 52ca9f6..05b03ba 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -1531,7 +1531,8 @@ CompilerInvocation::getSemanticsCtx(
auto &fortranOptions = getFortranOpts();
auto semanticsContext = std::make_unique<semantics::SemanticsContext>(
- getDefaultKinds(), fortranOptions.features, allCookedSources);
+ getDefaultKinds(), fortranOptions.features, getLangOpts(),
+ allCookedSources);
semanticsContext->set_moduleDirectory(getModuleDir())
.set_searchDirectories(fortranOptions.searchDirectories)