File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -198,21 +198,10 @@ class Scope {
198198 const SourceName &name, Attrs attrs, Symbol &cbUltimate);
199199
200200 // Find COMMON block that is declared in the current scope
201- Symbol *FindCommonBlock (const SourceName &name) const {
202- if (const auto it{commonBlocks_.find (name)}; it != commonBlocks_.end ()) {
203- return &*it->second ;
204- }
205- return nullptr ;
206- }
201+ Symbol *FindCommonBlock (const SourceName &name) const ;
207202
208203 // Find USE-associated COMMON block in the current scope
209- Symbol *FindCommonBlockUse (const SourceName &name) const {
210- if (const auto it{commonBlockUses_.find (name)};
211- it != commonBlockUses_.end ()) {
212- return &*it->second ;
213- }
214- return nullptr ;
215- }
204+ Symbol *FindCommonBlockUse (const SourceName &name) const ;
216205
217206 // Find COMMON block in current and surrounding scopes, follow USE
218207 // associations
Original file line number Diff line number Diff line change @@ -192,6 +192,21 @@ bool Scope::AddCommonBlockUse(
192192 return commonBlockUses_.emplace (name, useCB).second ;
193193}
194194
195+ Symbol *Scope::FindCommonBlock (const SourceName &name) const {
196+ if (const auto it{commonBlocks_.find (name)}; it != commonBlocks_.end ()) {
197+ return &*it->second ;
198+ }
199+ return nullptr ;
200+ }
201+
202+ Symbol *Scope::FindCommonBlockUse (const SourceName &name) const {
203+ if (const auto it{commonBlockUses_.find (name)};
204+ it != commonBlockUses_.end ()) {
205+ return &*it->second ;
206+ }
207+ return nullptr ;
208+ }
209+
195210bool Scope::AddSubmodule (const SourceName &name, Scope &submodule) {
196211 return submodules_.emplace (name, submodule).second ;
197212}
You can’t perform that action at this time.
0 commit comments