llvm/flang/tools/f18
Tim Keith 96b187efdf [flang] Add support for submodules
Symbols for submodules have `ModuleDetails` with `isSubmodule` set.
Scopes for submodules have `Module` kind and have a parent scope that
is also `Module` kind.

Scopes for modules now contain a mapping of submodule name to scope
so that we can find them without having to search the scope tree or
re-read their `.mod` file.

The module file for submodule `s` with ancestor module `m` is named `m-s.mod`.
The tree structure of scopes means module file writing is now recursive.
Similarly, reading the module file for a submodule may require reading
the module files of its parent and ancestor. `ResolveNames` now requires
the parent scope to be passed in -- it is not always the global scope.

`test_modfiles.sh` now handles an argument that is a filename glob so
that the test can involve multiple files. This allows `modfile09` to
test reading of `.mod` files for modules and submodules.

Original-commit: flang-compiler/f18@2e4424dbc8
Reviewed-on: https://github.com/flang-compiler/f18/pull/160
Tree-same-pre-rewrite: false
2018-08-02 16:21:27 -07:00
..
CMakeLists.txt [flang] Begin semantic analysis of expressions. 2018-07-24 14:33:52 -07:00
dump.cc [flang] Use brace initialization in tools/f18 2018-07-17 07:05:35 -07:00
f18.cc [flang] Add support for submodules 2018-08-02 16:21:27 -07:00