[all-commits] [llvm/llvm-project] 1b241b: [flang] Handle multiple USE statements for the sam...
Pete Steinfeld via All-commits
all-commits at lists.llvm.org
Fri Jun 11 12:30:58 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1b241b9b400bdfc5b8e0d157f0f46436677927b8
https://github.com/llvm/llvm-project/commit/1b241b9b400bdfc5b8e0d157f0f46436677927b8
Author: Peter Steinfeld <psteinfeld at nvidia.com>
Date: 2021-06-11 (Fri, 11 Jun 2021)
Changed paths:
M flang/lib/Semantics/resolve-names.cpp
A flang/test/Semantics/modfile41.f90
Log Message:
-----------
[flang] Handle multiple USE statements for the same module
It's possible to have several USE statements for the same module that
have different mixes of rename clauses and ONLY clauses. The presence
of a rename cause has the effect of hiding a previously associated name,
and the presence of an ONLY clause forces the name to be visible even in
the presence of a rename.
I fixed this by keeping track of the names that appear on rename and ONLY
clauses. Then, when processing the USE association of a name, I check to see
if it previously appeared in a rename clause and not in a USE clause. If so, I
remove its USE associated symbol. Also, when USE associating all of the names
in a module, I do not USE associate names that have appeared in rename clauses.
I also added a test.
Differential Revision: https://reviews.llvm.org/D104130
More information about the All-commits
mailing list