f62f8b655d
When a use-stmt is encountered for a module that isn't in the global scope, search for and read the appropriate `.mod` file. To perform the search, pass the search directories in to ResolveNames. For modules that were read from `.mod` files, we have to keep the cooked source from being deleted so that the names so that references to names stay valid. So we store the cooked source in the Scope of the module as a `unique_ptr`. Add `Symbol::Flag::ModFile` to distinguish module symbols that were read from a `.mod` file rather than from the current compilation. Use it to prevent writing those back out. Fix test_errors.sh to run the compiler in the temp subdirectory -- otherwise tests could be affected by `.mod` files left from previous tests. Original-commit: flang-compiler/f18@207065999c Reviewed-on: https://github.com/flang-compiler/f18/pull/145 |
||
---|---|---|
.. | ||
C++style.md | ||
ControlFlowGraph.md | ||
directives.md | ||
extensions.md | ||
f2018-grammar.txt | ||
flang-c-style.el | ||
FortranForCProgrammers.md | ||
mod-files.md | ||
OpenMP-4.5-grammar.txt | ||
ParserCombinators.md | ||
parsing.md | ||
preprocessing.md | ||
RuntimeDescriptor.md | ||
semantics.md |