[PATCH] D93344: [flang] Handle multiple names for same operator

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 14:47:01 PST 2020


tskeith created this revision.
tskeith added reviewers: klausler, PeteSteinfeld.
tskeith added a project: Flang.
Herald added a subscriber: jdoerfert.
tskeith requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Some operators have more than one name, e.g. operator(==), operator(.eq).
That was working correctly in generic definitions but they can also
appear in other contexts: USE statements and access statements, for
example.

This changes FindInScope to always look for each of the names for
a symbol. So an operator may be use-associated under one name but
declared private under another name and it will be the same symbol.
This replaces GenericSpecInfo::FindInScope which was only usable in
some cases.

Add a version of FindInScope() that looks in the current scope to
simplify many of the calls.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93344

Files:
  flang/lib/Semantics/resolve-names-utils.cpp
  flang/lib/Semantics/resolve-names-utils.h
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Semantics/modfile07.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93344.312038.patch
Type: text/x-patch
Size: 14079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201215/99035406/attachment.bin>


More information about the llvm-commits mailing list