[all-commits] [llvm/llvm-project] 7082de: [flang] Handle multiple names for same operator

Tim Keith via All-commits all-commits at lists.llvm.org
Wed Dec 16 07:11:39 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7082de56b7ad4b4eeb75e59e0d4c28bed44b5d23
      https://github.com/llvm/llvm-project/commit/7082de56b7ad4b4eeb75e59e0d4c28bed44b5d23
  Author: Tim Keith <tkeith at nvidia.com>
  Date:   2020-12-16 (Wed, 16 Dec 2020)

  Changed paths:
    M flang/lib/Semantics/resolve-names-utils.cpp
    M flang/lib/Semantics/resolve-names-utils.h
    M flang/lib/Semantics/resolve-names.cpp
    M flang/test/Semantics/modfile07.f90

  Log Message:
  -----------
  [flang] Handle multiple names for same operator

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.

Differential Revision: https://reviews.llvm.org/D93344




More information about the All-commits mailing list