Commit graph

389 commits

Author SHA1 Message Date
Steve Scalpone
ead68854e1 [flang] Update CMakefiles and #include paths.
Original-commit: flang-compiler/f18@1b7b8259b3
Reviewed-on: https://github.com/flang-compiler/f18/pull/76
2018-05-02 09:21:03 -07:00
Steve Scalpone
209afdcea2 [flang] Removed unused files and declarations.
Renamed ParseTreeDump to dump-parse-tree.

Original-commit: flang-compiler/f18@9de97328f1
Reviewed-on: https://github.com/flang-compiler/f18/pull/76
Tree-same-pre-rewrite: false
2018-05-02 09:15:33 -07:00
Tim Keith
a9ed8e7eee [flang] Merge pull request flang-compiler/f18#75 from ThePortlandGroup/tsk4
Cleanup

Original-commit: flang-compiler/f18@d1545693d1
Reviewed-on: https://github.com/flang-compiler/f18/pull/75
2018-05-01 14:44:40 -07:00
Tim Keith
4008e3e5d7 [flang] Make include guards consistent.
The include guard symbol is `FORTRAN_$dir_$file_H_` where $dir is the
subdirectory of `lib` and $file is the basename of the header file.
Those names are mapped to uppercase and hyphens are replaced by
underscores.

Original-commit: flang-compiler/f18@ac9c0e7106
Reviewed-on: https://github.com/flang-compiler/f18/pull/75
2018-05-01 14:07:52 -07:00
Tim Keith
ad129874a9 [flang] Remove unused files.
Original-commit: flang-compiler/f18@856315fd43
Reviewed-on: https://github.com/flang-compiler/f18/pull/75
Tree-same-pre-rewrite: false
2018-05-01 13:29:10 -07:00
Tim Keith
98cb77a0cf [flang] Merge pull request flang-compiler/f18#74 from ThePortlandGroup/tsk4
Add copyright notices.

Original-commit: flang-compiler/f18@20f64da9d9
Reviewed-on: https://github.com/flang-compiler/f18/pull/74
2018-05-01 13:24:54 -07:00
Tim Keith
18cee3e8e6 [flang] Add copyright notices.
For source files (C++, Fortran, CMake) add copyright and license.
For documentation files add just copyright.

Original-commit: flang-compiler/f18@38381aed83
Reviewed-on: https://github.com/flang-compiler/f18/pull/74
2018-05-01 12:50:34 -07:00
Peter Klausler
dd02ee1216 [flang] Merge pull request flang-compiler/f18#73 from ThePortlandGroup/pmk-scrub3
More clean-up & build with Clang

Original-commit: flang-compiler/f18@c809062f11
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
2018-04-27 15:32:12 -07:00
peter klausler
681b59f282 [flang] Clean out the PGI stuff from CMakeLists.txt.
Original-commit: flang-compiler/f18@806db179ce
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
2018-04-27 15:03:28 -07:00
peter klausler
20fe058749 [flang] Fix a static_assert and a message location bug in first().
Original-commit: flang-compiler/f18@cd85bff31b
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-27 13:37:51 -07:00
peter klausler
3ed22efb75 [flang] silence a warning
Original-commit: flang-compiler/f18@dc91727ac4
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-27 12:43:16 -07:00
peter klausler
9702fcaf97 [flang] More Clang work.
Original-commit: flang-compiler/f18@7ff98ad778
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-27 12:37:47 -07:00
peter klausler
3fd2c17cf2 [flang] Use libc++ with clang.
Original-commit: flang-compiler/f18@d81b8d87f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 17:03:54 -07:00
peter klausler
b9ee2fc6ae [flang] Use first() to define operator|| when compiling with clang.
Original-commit: flang-compiler/f18@7bf98d683c
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 16:52:11 -07:00
peter klausler
c3e406eb27 [flang] Remove excess space at end of line.
Original-commit: flang-compiler/f18@900dc4e254
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 16:27:07 -07:00
peter klausler
dd57a6e695 [flang] Refine CMakeLists.txt tweaks.
Original-commit: flang-compiler/f18@b40c68f9ab
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 16:16:01 -07:00
peter klausler
ba4ee64c9d [flang] Package clang build settings.
Original-commit: flang-compiler/f18@775b42598d
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 16:03:01 -07:00
peter klausler
022a91b637 [flang] Patches to permit building with Clang without notes or warnings.
Original-commit: flang-compiler/f18@0e74b10603
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-26 15:44:29 -07:00
peter klausler
8fa4baa5e8 [flang] Use first() more.
Original-commit: flang-compiler/f18@a2f2fdf869
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:15 -07:00
peter klausler
6a0acd8505 [flang] Implement first(...) as attempt at a faster set of alternatives.
Original-commit: flang-compiler/f18@9f6a26cee6
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:15 -07:00
peter klausler
9e94216abe [flang] Attempt to build f18 with clang.
Original-commit: flang-compiler/f18@0480837234
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:15 -07:00
peter klausler
016fa9cf17 [flang] Attempt to build f18 with clang.
Original-commit: flang-compiler/f18@86fec97e41
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:14 -07:00
peter klausler
66c98ee4ca [flang] Resolve an old TODO by flattening a std::optional<std::optional<>>.
Original-commit: flang-compiler/f18@05f47831fc
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:14 -07:00
peter klausler
69e3842d60 [flang] Resolve old TODO about needless Indirection<>.
Original-commit: flang-compiler/f18@5f289209c4
Reviewed-on: https://github.com/flang-compiler/f18/pull/73
Tree-same-pre-rewrite: false
2018-04-25 14:16:12 -07:00
Tim Keith
0ceb4abf1a [flang] Merge pull request flang-compiler/f18#70 from ThePortlandGroup/tsk2
Initial support for name resolution in modules.

Original-commit: flang-compiler/f18@1c318fe9f7
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
2018-04-25 12:52:06 -07:00
Tim Keith
5b7fb2aa3a [flang] Improve comment.
Original-commit: flang-compiler/f18@270514a30b
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
2018-04-25 11:49:29 -07:00
Tim Keith
dd0f1ff81d [flang] Remove unnecessary defaults in switches.
Original-commit: flang-compiler/f18@f4835e3831
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
Tree-same-pre-rewrite: false
2018-04-25 11:44:12 -07:00
Tim Keith
cb37c3625a [flang] Non-fatal error for repeated access spec
When an access statement repeats the same attribute, make it a non-fatal
diagnostic. Also, include the previous specification in the message.

resolve11.f90 now illustrates both cases, fatal and non-fatal.

Original-commit: flang-compiler/f18@1f567c740a
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
Tree-same-pre-rewrite: false
2018-04-25 10:46:39 -07:00
Tim Keith
94fa0fd890 [flang] Initial support for name resolution in modules.
Recognize modules and open and close the corresponding scope.
Handle PUBLIC and PRIVATE statements and set the corresponding
attributes on entity declarations in the module.

Refactoring (no functional changes): Make CheckImplicitSymbol() and
GetVariableName() overloadings private and out-of-line.

Add missing option to f18 help.

Original-commit: flang-compiler/f18@d01cacca63
Reviewed-on: https://github.com/flang-compiler/f18/pull/70
Tree-same-pre-rewrite: false
2018-04-24 17:07:15 -07:00
Peter Klausler
1e3af84738 [flang] Merge pull request flang-compiler/f18#69 from ThePortlandGroup/pmk3
Make `construct<T>(...)` calls span more accurate source ranges.

Original-commit: flang-compiler/f18@e332daec7a
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
2018-04-24 16:34:01 -07:00
peter klausler
e1ac262cc0 [flang] Remove dead code, reformat.
Original-commit: flang-compiler/f18@c87fdd8cd9
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
2018-04-24 16:27:01 -07:00
peter klausler
2a61c691e8 [flang] Reformat.
Original-commit: flang-compiler/f18@047de95439
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
Tree-same-pre-rewrite: false
2018-04-24 15:26:50 -07:00
peter klausler
29a6c1a83c [flang] Allow construct<T>("TOKEN"_tok)" with unvalued parser argument.
Original-commit: flang-compiler/f18@19d2a4a849
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
Tree-same-pre-rewrite: false
2018-04-24 15:02:41 -07:00
peter klausler
817163f9f5 [flang] Add constructIf<>(); complete pass over grammar.
Original-commit: flang-compiler/f18@4d5b4055bd
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
Tree-same-pre-rewrite: false
2018-04-24 12:41:34 -07:00
peter klausler
fb1397ba57 [flang] Adjust productions in grammar.h so that construct<> invocations span what they cover (more to come)
Original-commit: flang-compiler/f18@ba5c2368d1
Reviewed-on: https://github.com/flang-compiler/f18/pull/69
Tree-same-pre-rewrite: false
2018-04-24 12:41:33 -07:00
Tim Keith
4859bf7db8 [flang] Merge pull request flang-compiler/f18#67 from ThePortlandGroup/tsk3
Create Message instances with provenance range.

Original-commit: flang-compiler/f18@6e473cd029
Reviewed-on: https://github.com/flang-compiler/f18/pull/67
2018-04-24 12:30:09 -07:00
Tim Keith
511af19d41 [flang] Create Message instances with provenance range.
This allows the message to point to the full name or statement
rather than just the first character.

Original-commit: flang-compiler/f18@9cf41b1335
Reviewed-on: https://github.com/flang-compiler/f18/pull/67
2018-04-23 16:18:48 -07:00
Peter Klausler
82fd470b91 [flang] Merge pull request flang-compiler/f18#68 from ThePortlandGroup/pmk-scrub2
Remove needless empty braces from construct<>() calls.

Original-commit: flang-compiler/f18@d7609befe6
Reviewed-on: https://github.com/flang-compiler/f18/pull/68
2018-04-24 10:45:23 -07:00
peter klausler
925cadcddc [flang] Remove needless empty braces from construct<>() calls.
Original-commit: flang-compiler/f18@f9c4a27034
Reviewed-on: https://github.com/flang-compiler/f18/pull/68
2018-04-23 16:53:16 -07:00
Peter Klausler
758fb308ef [flang] Merge pull request flang-compiler/f18#66 from ThePortlandGroup/pmk-scrub
Code clean-up & provenance ranges on messages

Original-commit: flang-compiler/f18@fd50389e44
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
2018-04-23 15:54:38 -07:00
peter klausler
64e64e6747 [flang] Delete more dead code.
Original-commit: flang-compiler/f18@e38e411ccf
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
2018-04-23 15:44:30 -07:00
peter klausler
e42168a903 [flang] Remove dead code.
Original-commit: flang-compiler/f18@a85e16c704
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:29 -07:00
peter klausler
e6b1f1f45e [flang] Use ranges of provenances in messages.
Original-commit: flang-compiler/f18@67d4f878a4
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:29 -07:00
peter klausler
d3c1a08e68 [flang] Extend Message representation to cover ranges.
Original-commit: flang-compiler/f18@314819c87f
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:28 -07:00
peter klausler
30f337a36d [flang] Finish cleaning up debug-parser.
Original-commit: flang-compiler/f18@0ef551025a
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:28 -07:00
peter klausler
cc589b2e8e [flang] Split debug-parser.h, put code into debug-parser.cc.
Original-commit: flang-compiler/f18@b34d15ef6d
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:27 -07:00
peter klausler
d2306759fc [flang] Finish moving user state action parsers into user-state.{h,cc}.
Original-commit: flang-compiler/f18@79c8a4cefe
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:27 -07:00
peter klausler
4412cb03c4 [flang] More clean-up.
Original-commit: flang-compiler/f18@96dda92286
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:26 -07:00
peter klausler
8800ae5e08 [flang] Begin moving UserState action parsers into user-state.{h,cc}.
Original-commit: flang-compiler/f18@5c31402146
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:25 -07:00
peter klausler
8c110e0af1 [flang] Fix header file name.
Original-commit: flang-compiler/f18@8abfeaed45
Reviewed-on: https://github.com/flang-compiler/f18/pull/66
Tree-same-pre-rewrite: false
2018-04-23 15:44:24 -07:00