[all-commits] [llvm/llvm-project] 9ce8e6: [flang] Better renaming in module files (#93106)
Peter Klausler via All-commits
all-commits at lists.llvm.org
Thu May 23 16:21:14 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9ce8e63ceb447f7c2a0e92595466ed13a5acac48
https://github.com/llvm/llvm-project/commit/9ce8e63ceb447f7c2a0e92595466ed13a5acac48
Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
Date: 2024-05-23 (Thu, 23 May 2024)
Changed paths:
M flang/include/flang/Evaluate/constant.h
M flang/include/flang/Evaluate/expression.h
M flang/include/flang/Evaluate/type.h
M flang/include/flang/Semantics/semantics.h
M flang/lib/Evaluate/formatting.cpp
M flang/lib/Semantics/mod-file.cpp
M flang/lib/Semantics/mod-file.h
M flang/test/Semantics/modfile03.f90
Log Message:
-----------
[flang] Better renaming in module files (#93106)
When a symbol from one module is used in another without an explicit USE
association, the module file output code may need to use another name
for it -- either with a name that is already available via USE
association with renaming, or by means of a new private USE association,
possibly with renaming to avoid a clash.
Module file output was dealing properly with names of derived types, but
wasn't accounting for symbols that appear in expressions other than
initializations. This was specifically a problem with an application
module that had a call to a NOPASS type-bound procedure in an array
bound specification expression, which semantics had resolved to the name
of a private module function.
This patch implements renaming, when necessary, for all symbols
appearing in expressions and type names, and replaces the previous
implementation of derived type renaming. It also gets a little smarter
about avoiding the creation of compiler-generated names when a name from
another module has been brought into scope already by means of USE
association with renaming.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list