[flang-commits] [PATCH] D109262: [flang] Fix GetHostProcedure() for main program
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Sep 7 09:15:39 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf348f30d6fe9: [flang] Fix GetHostProcedure() for main program (authored by klausler).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109262/new/
https://reviews.llvm.org/D109262
Files:
flang/lib/Semantics/resolve-names.cpp
Index: flang/lib/Semantics/resolve-names.cpp
===================================================================
--- flang/lib/Semantics/resolve-names.cpp
+++ flang/lib/Semantics/resolve-names.cpp
@@ -2038,7 +2038,14 @@
Scope *ScopeHandler::GetHostProcedure() {
Scope &parent{InclusiveScope().parent()};
- return parent.kind() == Scope::Kind::Subprogram ? &parent : nullptr;
+ switch (parent.kind()) {
+ case Scope::Kind::Subprogram:
+ return &parent;
+ case Scope::Kind::MainProgram:
+ return &parent;
+ default:
+ return nullptr;
+ }
}
Scope &ScopeHandler::NonDerivedTypeScope() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109262.371102.patch
Type: text/x-patch
Size: 608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210907/cefa7bdb/attachment.bin>
More information about the flang-commits
mailing list