llvm-project/flang/lib/Frontend
Peter Klausler 52a1346b78 [flang] Distinguish intrinsic from non-intrinsic modules
For "USE, INTRINSIC", search only for intrinsic modules;
for "USE, NON_INTRINSIC", do not recognize intrinsic modules.
Allow modules of both kinds with the same name to be used in
the same source file (but not in the same scoping unit, a
constraint of the standard that is now enforced).

The symbol table's scope tree now has a single instance of
a scope with a new kind, IntrinsicModules, whose children are
the USE'd intrinsic modules (explicit or not).  This separate
"top-level" scope is a child of the single global scope and
it allows both intrinsic and non-intrinsic modules of the same
name to exist in the symbol table.  Intrinsic modules' scopes'
symbols now have the INTRINSIC attribute set.

The search path directories need to make a distinction between
regular directories and the one(s) that point(s) to intrinsic
modules.  I allow for multiple intrinsic module directories in
the second search path, although only one is needed today.

Differential Revision: https://reviews.llvm.org/D118631
2022-01-31 13:31:27 -08:00
..
CMakeLists.txt [flang][driver] Add debug measure-parse-tree and pre-fir-tree options 2021-02-19 11:27:54 +00:00
CompilerInstance.cpp [flang][driver][nfc] Fix capitalisation 2022-01-31 10:36:18 +00:00
CompilerInvocation.cpp [flang] Distinguish intrinsic from non-intrinsic modules 2022-01-31 13:31:27 -08:00
FrontendAction.cpp [flang][driver][nfc] Fix capitalisation 2022-01-31 10:36:18 +00:00
FrontendActions.cpp [flang][driver] Add actions that execute despite semantic errors 2021-10-11 11:52:05 +00:00
FrontendOptions.cpp [flang] Produce proper "preprocessor output" for -E option 2021-07-30 15:13:56 -07:00
TextDiagnostic.cpp [flang] Introduce DiagnosticConsumer classes in libflangFrontend 2020-10-05 17:46:44 +01:00
TextDiagnosticBuffer.cpp [flang] Introduce DiagnosticConsumer classes in libflangFrontend 2020-10-05 17:46:44 +01:00
TextDiagnosticPrinter.cpp [flang] Introduce DiagnosticConsumer classes in libflangFrontend 2020-10-05 17:46:44 +01:00