This is an archive of the discontinued LLVM Phabricator instance.

[flang] Create names to allow access to inaccessible specifics
ClosedPublic

Authored by klausler on Jan 15 2021, 11:54 AM.

Details

Summary

When a reference to a generic interface occurs in a specification
expression that must be emitted to a module file, we have a problem
when the generic resolves to a function whose name is inaccessible
due to being PRIVATE or due to a conflict with another use of the
same name in the scope. In these cases, construct a new name for
the specific procedure and emit a renaming USE to the module file.
Also, relax enforcement of PRIVATE when analyzing module files.

Diff Detail

Event Timeline

klausler created this revision.Jan 15 2021, 11:54 AM
klausler requested review of this revision.Jan 15 2021, 11:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2021, 11:54 AM
tskeith accepted this revision.Jan 15 2021, 2:14 PM
tskeith added inline comments.
flang/include/flang/Semantics/tools.h
41

This is only used in a boolean context, so it could be something like bool IsInModFile(const Scope &).

This revision is now accepted and ready to land.Jan 15 2021, 2:14 PM