llvm/flang/lib/semantics
Tim Keith 4c99dc2a94 [flang] Support interface blocks.
Add subprogram symbols for each interface-body and set isInterface on
them. Create a symbol with GenericDetails for each generic interface
block and add interface specifications to the specific procedures of
the generic. InterfaceVisitor takes care of this.

Before processing the specification part of modules and subprograms,
collect the names of module subprograms and internal subprograms and add
them to the symbol table with SubprogramNameDetails. This allows us to
reference them from interface blocks in the specification part.
SubprogramNameDetails is converted to SubprogramDetails when the real
subprogram is visited.

This is achieved by setting subpNamesOnly_ and then walking the
ModuleSubprogramPart or InternalSubprogramPart. Creating the symbol and
scope for a module or subprogram now happens when the Module,
SubroutineSubprogram, or FunctionSubprogram node is encountered so
this can happen in the right order.

Add BeginSubprogram and EndSubprogram to handle the parts in common
between subprograms and interface specifications.

Add GenericSpec to type.h to represent all possible generic specs.
Only generic names are resolved so far.

Add tests for new error messages. Change resolve02.f90 to reflect the
new errors reported.

Original-commit: flang-compiler/f18@03148b49dd
Reviewed-on: https://github.com/flang-compiler/f18/pull/88
Tree-same-pre-rewrite: false
2018-05-14 13:53:02 -07:00
..
attr.cc [flang] Normalize namespace definitions. 2018-05-02 13:52:36 -07:00
attr.h [flang] Run clang-format on all .h and .cc files. 2018-05-02 14:06:02 -07:00
CMakeLists.txt [flang] Clean up dump-parse-tree.h 2018-05-04 10:30:34 -07:00
dump-parse-tree.h [flang] incorporate review comment 2018-05-04 10:32:54 -07:00
enum-set.h [flang] Build with g++ 8.1.0 compiler and headers. 2018-05-08 10:32:58 -07:00
resolve-names.cc [flang] Support interface blocks. 2018-05-14 13:53:02 -07:00
resolve-names.h [flang] Make include guards consistent. 2018-05-01 14:07:52 -07:00
rewrite-parse-tree.cc [flang] Run clang-format on all .h and .cc files. 2018-05-02 14:06:02 -07:00
rewrite-parse-tree.h [flang] Make include guards consistent. 2018-05-01 14:07:52 -07:00
scope.cc [flang] Support interface blocks. 2018-05-14 13:53:02 -07:00
scope.h [flang] Support interface blocks. 2018-05-14 13:53:02 -07:00
symbol.cc [flang] Support interface blocks. 2018-05-14 13:53:02 -07:00
symbol.h [flang] Support interface blocks. 2018-05-14 13:53:02 -07:00
type.cc [flang] Support interface blocks. 2018-05-14 13:53:02 -07:00
type.h [flang] Support interface blocks. 2018-05-14 13:53:02 -07:00