llvm/flang/lib/semantics
Tim Keith 7ebbe7dca4 [flang] Write private symbols to .mod files
We were trying to write only symbols that are part of the public API of
a module to the .mod file. The problem with that is that submodules need
access to the private symbols in their ancestor modules and submodules.

For now, just write out all of the symbols, private or otherwise.
We could be more precise by omitting some private symbols for modules
that don't have separate module procedures and so can't have submodules.

Also, the old implementation went into an infinite loop for recursive
derived types.

This makes CollectSymbols simpler, so have it do both the collecting and
sorting. Make it static so that the types don't have to be defined in
mod-file.h.

Original-commit: flang-compiler/f18@33a10d6238
Reviewed-on: https://github.com/flang-compiler/f18/pull/177
Tree-same-pre-rewrite: false
2018-09-10 11:39:03 -07:00
..
attr.cc [flang] Implement writing of .mod files. 2018-07-16 16:23:18 -07:00
attr.h [flang] Implement writing of .mod files. 2018-07-16 16:23:18 -07:00
CMakeLists.txt [flang] Begin semantic analysis of expressions. 2018-07-24 14:33:52 -07:00
dump-parse-tree.h [flang] Improve dumping of enums in parse tree 2018-09-05 16:18:34 -07:00
expression.cc [flang] More expression analysis of literal constants. 2018-08-09 10:17:43 -07:00
expression.h [flang] More expression analysis of literal constants. 2018-08-09 10:17:43 -07:00
mod-file.cc [flang] Write private symbols to .mod files 2018-09-10 11:39:03 -07:00
mod-file.h [flang] Write private symbols to .mod files 2018-09-10 11:39:03 -07:00
resolve-names.cc [flang] Ensure use of ObjectEntityDetails for data objects 2018-09-07 09:57:14 -07:00
resolve-names.h [flang] Add support for submodules 2018-08-02 16:21:27 -07:00
rewrite-parse-tree.cc [flang] Code cleanup 2018-09-07 09:31:02 -07:00
rewrite-parse-tree.h [flang] Small improvements to name resolution 2018-08-29 11:38:12 -07:00
scope.cc [flang] Address review comments 2018-09-07 09:06:27 -07:00
scope.h [flang] Write private symbols to .mod files 2018-09-10 11:39:03 -07:00
symbol.cc [flang] More derived type name resolution 2018-09-06 08:01:49 -07:00
symbol.h [flang] More derived type name resolution 2018-09-06 08:01:49 -07:00
type.cc [flang] Add virtual IntExpr::~IntExpr to silence Clang warning about non-virtual dtor in a class with virtual functions. 2018-08-03 16:07:58 -07:00
type.h [flang] Add virtual IntExpr::~IntExpr to silence Clang warning about non-virtual dtor in a class with virtual functions. 2018-08-03 16:07:58 -07:00
unparse-with-symbols.cc [flang] Implement host association and import statements 2018-08-22 16:05:06 -07:00
unparse-with-symbols.h [flang] Support unparse with symbol annotations. 2018-06-26 15:01:42 -07:00