[PATCH] D93345: [flang] Handle undeclared names in EQUIVALENCE statements
Peter Klausler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 15 15:58:02 PST 2020
klausler requested changes to this revision.
klausler added inline comments.
This revision now requires changes to proceed.
================
Comment at: flang/include/flang/Semantics/scope.h:133
+ // Look for symbol by name only in this scope (for EQUIVALENCE statements)
+ Symbol *FindLocalSymbol(const SourceName &) const;
----------------
This is really just a convenience wrapper for `find()`, yes? If so, then either it's redundant with `find()`, or you should find and replace other uses of `find()` with your new API and avoid the confusion that can arise with multiple interfaces that do much the same thing. (Preference is for the former, since usage of `find()` in scopes is pretty idiomatic by this point.)
================
Comment at: flang/include/flang/Semantics/semantics.h:88
bool debugModuleWriter() const { return debugModuleWriter_; }
+ bool inEquivalenceStmt() { return inEquivalenceStmt_; }
const evaluate::IntrinsicProcTable &intrinsics() const { return intrinsics_; }
----------------
The SemanticsContext object is probably not the best place for this new state. One of the visitor classes in name resolution would make more sense.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93345/new/
https://reviews.llvm.org/D93345
More information about the llvm-commits
mailing list