aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorTim Keith <tkeith@nvidia.com>2020-12-02 15:13:49 -0800
committerTim Keith <tkeith@nvidia.com>2020-12-02 15:13:50 -0800
commit86f59de13b8058280d468984727bd1e6727f2112 (patch)
treea8fdfad5e288b78e5119cf8e6284e3cd399303db /clang/lib/Basic/FileManager.cpp
parentc49e71805142ac3a27a5567ce516890e9243b34e (diff)
downloadllvm-86f59de13b8058280d468984727bd1e6727f2112.zip
llvm-86f59de13b8058280d468984727bd1e6727f2112.tar.gz
llvm-86f59de13b8058280d468984727bd1e6727f2112.tar.bz2
[flang] Fix bugs related to merging generics during USE
When the same generic name is use-associated from two modules, the generics are merged into a single one in the current scope. This change fixes some bugs in that process. When a generic is merged, it can have two specific procedures with the same name as the generic (c.f. module m7c in modfile07.f90). We were disallowing that by checking for duplicate names in the generic rather than duplicate symbols. Changing `namesSeen` to `symbolsSeen` in `ResolveSpecificsInGeneric` fixes that. We weren't including each USE of those generics in the .mod file so in some cases they were incorrect. Extend GenericDetails to specify all use-associated symbols that are merged into the generic. This is used to write out .mod files correctly. The distinguishability check for specific procedures of a generic sometimes have to refer to procedures from a use-associated generic in error messages. In that case we don't have the source location of the procedure so adapt the message to say where is was use-associated from. This requires passing the scope through the checks to make that determination. Differential Revision: https://reviews.llvm.org/D92492
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
0 files changed, 0 insertions, 0 deletions