Commit graph

453 commits

Author SHA1 Message Date
Hongyon Suauthai
db9bfab89d [flang] add more clauses, declarative directives, standalone directives, and directives enclosing do loop.
Original-commit: flang-compiler/f18@483a54b0c8
Reviewed-on: https://github.com/flang-compiler/f18/pull/96
Tree-same-pre-rewrite: false
2018-05-31 07:38:15 -07:00
Tim Keith
b6d08173ee [flang] Improvements to generics.
When a generic or specific procedure is use-associated, make a copy of
it in the current scope (replacing the symbol that has UseDetails) so
that we can make changes to it. This permits a generic to be defined in
one module and extended with more specific procedures in another.

When a specific procedure has the same name as its generic, it can't be
stored directly in the scope because that is indexed by name and the
generic is already there. So instead we store the specific in the
GenericDetails of the generic symbol.

Enforce the rule that a generic and a procedure can only have the same
name if the procedure is one of the specifics of the generic.

Refactorings done is support of this change:
- Add FindSymbol() and EraseSymbol() as helpers to find or erase a
  symbol in the current scope. Make use of FindSymbol() where appropriate.
- Add SayAlreadyDeclared() to report a common error.

Original-commit: flang-compiler/f18@be479b9887
Reviewed-on: https://github.com/flang-compiler/f18/pull/95
2018-05-22 16:12:56 -07:00
Steve Scalpone
f92e44e217 [flang] Create LICENSE
We expect to adopt the llvm.org license in the near future.

Original-commit: flang-compiler/f18@a1a01e949b
2018-05-18 13:06:22 -07:00
Steve Scalpone
2a69600b60 [flang] Update build instructions (flang-compiler/f18#94)
* Update build instructions

Add an overview and update the build instructions for f18.

Original-commit: flang-compiler/f18@a60060cfe1
Reviewed-on: https://github.com/flang-compiler/f18/pull/94
2018-05-18 13:02:58 -07:00
Tim Keith
c97d1b9742 [flang] Address review comments.
Original-commit: flang-compiler/f18@5361f3c810
Reviewed-on: https://github.com/flang-compiler/f18/pull/93
2018-05-17 14:16:15 -07:00
Tim Keith
2fb1c16e94 [flang] Clean up; fix assert and crashes
This is the result of running `f18 -fdebug-resolve-names` on a bunch of
Fortran source and fixing the resulting assertion errors and segmentation
faults.

Most of the problems were with encountering attributes, array specs, or
declaration type specs when we weren't prepared to handle them. Those
were fixed by adding calls to {Begin,End}DeclTypeSpec and {Begin,End}Decl
when encountering certain nodes, though the real work for those nodes is
still to be done.

Extract some common functionality into PostAttrSpec and CheckUseError.

Add missing XOR to GenericSpec.

Original-commit: flang-compiler/f18@3c0ff7ded4
Reviewed-on: https://github.com/flang-compiler/f18/pull/93
Tree-same-pre-rewrite: false
2018-05-17 13:06:38 -07:00
peter klausler
88e80408ae [flang] More descriptor work.
Original-commit: flang-compiler/f18@269cb52876
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
2018-05-17 11:32:23 -07:00
peter klausler
588d36b2c6 [flang] Refine type bound define assignment.
Original-commit: flang-compiler/f18@1552251c45
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 16:57:43 -07:00
peter klausler
7b542380a3 [flang] Separate generic from specialized parts of derived types and their components.
Original-commit: flang-compiler/f18@b578f607be
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 16:17:09 -07:00
peter klausler
46d16e8ab6 [flang] rearrange some TODO comments
Original-commit: flang-compiler/f18@64fc7fdf2c
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 14:25:45 -07:00
peter klausler
e37867de2e [flang] more review comments
Original-commit: flang-compiler/f18@d85e171b11
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 13:55:43 -07:00
peter klausler
13f88a1400 [flang] more thinking about requirements for defined assignment &c.
Original-commit: flang-compiler/f18@20fb1a4045
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 13:50:04 -07:00
peter klausler
284aa76bd3 [flang] review comments
Original-commit: flang-compiler/f18@87f158c68f
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 13:49:37 -07:00
peter klausler
004852fc23 [flang] Add a TODO.
Original-commit: flang-compiler/f18@b9b929384b
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 11:32:24 -07:00
peter klausler
64ea1ff79d [flang] Fix clang-only build warning, run clang-format.
Original-commit: flang-compiler/f18@bbc6b25346
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 10:31:35 -07:00
peter klausler
6261c0935c [flang] Document and initiate development of run time descriptors.
Original-commit: flang-compiler/f18@79edea528f
Reviewed-on: https://github.com/flang-compiler/f18/pull/92
Tree-same-pre-rewrite: false
2018-05-16 10:22:33 -07:00
peter klausler
adcfd4a0f5 [flang] clang-format
Original-commit: flang-compiler/f18@acb149dc7c
Reviewed-on: https://github.com/flang-compiler/f18/pull/90
2018-05-16 10:00:14 -07:00
peter klausler
7e2d19d5da [flang] Fine tuning of space recognition.
Original-commit: flang-compiler/f18@622befa9ca
Reviewed-on: https://github.com/flang-compiler/f18/pull/90
Tree-same-pre-rewrite: false
2018-05-16 09:59:43 -07:00
peter klausler
b010047266 [flang] Dodge bogus warning about unused anonymous variable in refactored code.
Original-commit: flang-compiler/f18@1d3cfe0038
Reviewed-on: https://github.com/flang-compiler/f18/pull/90
Tree-same-pre-rewrite: false
2018-05-16 09:59:42 -07:00
peter klausler
454f909cbc [flang] Fix tokenization of signed-int-literal-constant, allow internal space.
Original-commit: flang-compiler/f18@afa6425b48
Reviewed-on: https://github.com/flang-compiler/f18/pull/90
Tree-same-pre-rewrite: false
2018-05-16 09:59:41 -07:00
Hongyon Suauthai
afac6ff43d [flang] Modified directive names and clauses to reflect in OpenMP Spec.
Original-commit: flang-compiler/f18@c2f756f478
Reviewed-on: https://github.com/flang-compiler/f18/pull/91
2018-05-16 09:49:35 -07:00
Hongyon Suauthai
6f7b4fa691 [flang] Add OpenMP parallel directives and private/firstprivate clauses to parser.
Original-commit: flang-compiler/f18@ea8abe45cc
Reviewed-on: https://github.com/flang-compiler/f18/pull/91
Tree-same-pre-rewrite: false
2018-05-16 07:28:54 -07:00
Tim Keith
5978ac9c40 [flang] Refactor: make some methods out-of-line.
Original-commit: flang-compiler/f18@d2d5457e46
Reviewed-on: https://github.com/flang-compiler/f18/pull/88
2018-05-14 14:26:39 -07:00
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
Tim Keith
19507b91ce [flang] Separate const and non-const operator* in Indirection
Without this, Walk(const Indirection<T>...) can call a Walk function
with non-const T.

Original-commit: flang-compiler/f18@8c98b0a9b9
Reviewed-on: https://github.com/flang-compiler/f18/pull/88
Tree-same-pre-rewrite: false
2018-05-14 13:53:02 -07:00
Tim Keith
3c1f2b9670 [flang] Extract class SubprogramVisitor out of ResolveNamesVisitor.
This is just refactoring. SubprogramVisitor now contains the functionality
related to subprograms, including statement functions. This is preparation
for handling interface blocks.

Also, change MessageHandler to create the Messages object and return it
through an accessor rather than having it created outside and passed in.
This saves us from having to pass it up through the chain of constructors.

Original-commit: flang-compiler/f18@f73cfa2fe9
Reviewed-on: https://github.com/flang-compiler/f18/pull/88
Tree-same-pre-rewrite: false
2018-05-14 13:53:02 -07:00
peter klausler
653238cdef [flang] address review comment
Original-commit: flang-compiler/f18@bd8a96cf70
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
2018-05-11 14:23:18 -07:00
peter klausler
484a852cff [flang] Document preprocessing more.
Original-commit: flang-compiler/f18@93f7a0b011
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 13:29:22 -07:00
peter klausler
f651e74244 [flang] a little more refinement
Original-commit: flang-compiler/f18@5754d426e8
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 12:54:49 -07:00
peter klausler
42964c090c [flang] Clean up for merge.
Original-commit: flang-compiler/f18@608ef132c0
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 12:44:56 -07:00
peter klausler
ab723922bc [flang] Remove blanks from macro-replaced text in fixed form source.
Original-commit: flang-compiler/f18@c33dad2162
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 12:20:00 -07:00
peter klausler
926db8e9aa [flang] Implement proper swap() and operator=(&&) for some types that need them.
Original-commit: flang-compiler/f18@a9c53d8bb5
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 11:32:10 -07:00
peter klausler
f1840f1601 [flang] Quash multiple blanks when preprocessing.
Original-commit: flang-compiler/f18@d91680b469
Reviewed-on: https://github.com/flang-compiler/f18/pull/87
Tree-same-pre-rewrite: false
2018-05-11 11:15:20 -07:00
peter klausler
46c53c74b5 [flang] Tweak compiler directive continuation line processing to insert a space across the line break when needed.
Original-commit: flang-compiler/f18@de3a4a01ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/86
2018-05-10 13:48:55 -07:00
peter klausler
bef608aeb2 [flang] Fix another bug found in test.
Original-commit: flang-compiler/f18@7c5df7f3f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
2018-05-09 16:16:10 -07:00
peter klausler
41aec2d65e [flang] fix previous changes after testing
Original-commit: flang-compiler/f18@c088704f13
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
Tree-same-pre-rewrite: false
2018-05-09 16:06:57 -07:00
peter klausler
a726229c3a [flang] Observe line length limit when unparsing BOZ literals.
Original-commit: flang-compiler/f18@2c2e4035b6
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
Tree-same-pre-rewrite: false
2018-05-09 15:48:17 -07:00
peter klausler
a1e4a80ae6 [flang] Fix compiler directive continuation lines.
Original-commit: flang-compiler/f18@f30e3b71f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/85
Tree-same-pre-rewrite: false
2018-05-09 15:32:22 -07:00
peter klausler
a7a8506ce6 [flang] reformat for merge
Original-commit: flang-compiler/f18@ca8f9611f5
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
2018-05-08 13:15:13 -07:00
peter klausler
1e28daf2ab [flang] Keep message.cc buildable by g++ 7.2.
Original-commit: flang-compiler/f18@edd311972f
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-08 13:14:14 -07:00
peter klausler
29ab3bd5f2 [flang] Update README.md, can build with clang 6.0 + g++ 8.1.0 headers.
Original-commit: flang-compiler/f18@f57451d8d4
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-08 12:20:56 -07:00
peter klausler
c8415cec4d [flang] Update README with g++ 8.1.
Original-commit: flang-compiler/f18@a047f116da
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-08 11:01:47 -07:00
peter klausler
eef68291aa [flang] Build with g++ 8.1.0 compiler and headers.
Original-commit: flang-compiler/f18@53d80fc854
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-08 10:32:58 -07:00
peter klausler
1e036b2111 [flang] Copyediting of README.md.
Original-commit: flang-compiler/f18@32ffc711b6
Reviewed-on: https://github.com/flang-compiler/f18/pull/84
Tree-same-pre-rewrite: false
2018-05-07 14:39:36 -07:00
peter klausler
e2d10c079b [flang] Make sure that fixed form compiler directive line is not a continuation.
Original-commit: flang-compiler/f18@32994064f2
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
2018-05-07 13:26:40 -07:00
peter klausler
f76d2073de [flang] Fix bug noticed in code review.
Original-commit: flang-compiler/f18@7fc497064e
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-07 13:11:08 -07:00
peter klausler
fea41dc1e0 [flang] Improve error messages on bad escaped characters.
Original-commit: flang-compiler/f18@fb64849d6a
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-07 12:57:08 -07:00
peter klausler
4a56ad333f [flang] fix bug that could lose nonstandard usage warning messages
Original-commit: flang-compiler/f18@ff48aa95fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-07 12:37:10 -07:00
peter klausler
a6da97cb6f [flang] Use attachments to messages in resolve-names.cc
Original-commit: flang-compiler/f18@d24674f4ea
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 15:40:40 -07:00
peter klausler
bb7d39497d [flang] Use attachment for context.
Original-commit: flang-compiler/f18@e92cf73cf9
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 15:03:10 -07:00
peter klausler
04b8f48d86 [flang] Allow attachments to Messages.
Original-commit: flang-compiler/f18@08785977ce
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 14:39:29 -07:00
peter klausler
8f27198cd3 [flang] More clean-up.
Original-commit: flang-compiler/f18@ed60db3708
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 13:59:56 -07:00
peter klausler
b00fa16ce4 [flang] Some initial clean-up in messages, use std::variant to make component possibilities clearer.
Original-commit: flang-compiler/f18@9b7eeb2354
Reviewed-on: https://github.com/flang-compiler/f18/pull/83
Tree-same-pre-rewrite: false
2018-05-04 13:00:35 -07:00
peter klausler
67fc4f647f [flang] incorporate review comment
Original-commit: flang-compiler/f18@15bb84470d
Reviewed-on: https://github.com/flang-compiler/f18/pull/80
2018-05-04 10:32:54 -07:00
peter klausler
2a68453d7b [flang] reformat
Original-commit: flang-compiler/f18@d809458bb3
Reviewed-on: https://github.com/flang-compiler/f18/pull/80
Tree-same-pre-rewrite: false
2018-05-04 10:30:37 -07:00
peter klausler
e8490cdc60 [flang] Clean up dump-parse-tree.h
Original-commit: flang-compiler/f18@5024116397
Reviewed-on: https://github.com/flang-compiler/f18/pull/80
Tree-same-pre-rewrite: false
2018-05-04 10:30:34 -07:00
peter klausler
3689fe7015 [flang] fix building with clang after merge
Original-commit: flang-compiler/f18@7b53bf2a16
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
2018-05-04 10:19:50 -07:00
peter klausler
ca8d718f64 [flang] Do not sort messages by location for now.
Original-commit: flang-compiler/f18@8a92dad973
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:41:33 -07:00
peter klausler
da846e6bd9 [flang] reformat for merge
Original-commit: flang-compiler/f18@ccf265dad5
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:12 -07:00
peter klausler
35aef1025e [flang] Improve error message location.
Original-commit: flang-compiler/f18@5efd011d18
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:11 -07:00
peter klausler
1de02ee11c [flang] Add TODO comment.
Original-commit: flang-compiler/f18@1a82940ca8
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:11 -07:00
peter klausler
f9941a20b7 [flang] Fix preprocessor tokenization of .NE. style operators.
Original-commit: flang-compiler/f18@ab547b89e8
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:10 -07:00
peter klausler
bdd68813ca [flang] Allow conditional compilation directives to affect continuation lines (again).
Original-commit: flang-compiler/f18@9b9fd356dd
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:09 -07:00
peter klausler
45b6e41494 [flang] Ignore spaces in FORMAT specifications, even in free form.
Original-commit: flang-compiler/f18@3f65d35b1c
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:09 -07:00
peter klausler
82294af9c9 [flang] Fix two cosubscript parsing problems with lookahead.
Original-commit: flang-compiler/f18@b490c60fb0
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:08 -07:00
peter klausler
95c44cb55d [flang] Fix comment recognition in print *, "..."!comment
Original-commit: flang-compiler/f18@d647b8ed2f
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:07 -07:00
peter klausler
5e69a7507d [flang] Make messages more like clang's.
Original-commit: flang-compiler/f18@176cdf8e6c
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:06 -07:00
peter klausler
b867921eb8 [flang] Clean up message output a little; remove unused APIs.
Original-commit: flang-compiler/f18@64298b8d74
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:05 -07:00
peter klausler
795df00209 [flang] Don't process preprocessor directives amid continuation lines any more.
Original-commit: flang-compiler/f18@4a3dbb5d3e
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:04 -07:00
peter klausler
d9ff8df5db [flang] Allow $ and @ in defined operator names.
Original-commit: flang-compiler/f18@3cf7533a3b
Reviewed-on: https://github.com/flang-compiler/f18/pull/81
Tree-same-pre-rewrite: false
2018-05-04 09:35:03 -07:00
Tim Keith
9727b06813 [flang] Support for USE statements.
When a USE statement is encountered, find the scope corresponding to the
module. This is now stored in the ModuleDetails of the module symbol.
useModuleScope_ tracks this while processing the USE. Currently only
modules defined in the same file work because we don't have module files.

At the end of a USE that isn't a use-only, add all public names that
were not renamed.

AddUse() handles recording of a USE by creating a local symbol with
UseDetails that tracks the use-symbol in the module and the location of
the USE (for error messages). If an ambiguous USE is detected, the
UseDetails are replaced by UseErrorDetails. This tracks the locations of
all the uses so that they can be referenced in a diagnostic.

Detect attempts to re-declare use-associated symbols as well as changing
their attributes (except for ASYNCHRONOUS and VOLATILE).

Add missing checks for access-stmt in scoping units other than modules.

Add tests for the new errors.

Reorganize the MessageHandler::Say() overloadings to prevent them from
becoming too numerous.

Original-commit: flang-compiler/f18@cc0523134c
Reviewed-on: https://github.com/flang-compiler/f18/pull/79
2018-05-03 15:57:56 -07:00
Tim Keith
be1a9990a8 [flang] resolve-names.cc reorganization and cleanup.
Add ScopeHandle class to manage the stack of scopes and MakeSymbol(), which
makes a symbol in the current scope. Move the call to ApplyImplicitScopes()
into PopScope() as it must be done for each scope.

Add ModuleVisitor class to manage module-related resolution. Currently that
consists of beginning and ending modules and access statements. This is
preparation for further module work.

Replace references to parser::CharBlock with SourceName.

Original-commit: flang-compiler/f18@913df85e48
Reviewed-on: https://github.com/flang-compiler/f18/pull/79
Tree-same-pre-rewrite: false
2018-05-02 15:32:32 -07:00
Stephane Chauveau
4c36c0f950 [flang] misc changes in response to pul-request comments
Original-commit: flang-compiler/f18@1b3332d2ad
Reviewed-on: https://github.com/flang-compiler/f18/pull/78
2018-05-04 11:18:34 +02:00
Stephane Chauveau
300cff4fa6 [flang] fix typo in comment
Original-commit: flang-compiler/f18@477e852903
Reviewed-on: https://github.com/flang-compiler/f18/pull/78
Tree-same-pre-rewrite: false
2018-05-03 17:30:02 +02:00
Stephane Chauveau
5390d8a90b [flang] Add missing underscore to private members
Original-commit: flang-compiler/f18@7247cf4c3a
Reviewed-on: https://github.com/flang-compiler/f18/pull/78
Tree-same-pre-rewrite: false
2018-05-03 16:32:43 +02:00
Stephane Chauveau
dc704bfe6f [flang] Fix duplicate copyright message
Original-commit: flang-compiler/f18@65e3e86440
Reviewed-on: https://github.com/flang-compiler/f18/pull/78
Tree-same-pre-rewrite: false
2018-05-03 16:26:17 +02:00
Stephane Chauveau
63141a0739 [flang] Manual backport of sch_llvm branch
Original-commit: flang-compiler/f18@17ee2d8e3a
Reviewed-on: https://github.com/flang-compiler/f18/pull/78
Tree-same-pre-rewrite: false
2018-05-03 14:54:53 +02:00
Tim Keith
b8ec1fd041 [flang] Run clang-format on all .h and .cc files.
Original-commit: flang-compiler/f18@b7f02808a2
Reviewed-on: https://github.com/flang-compiler/f18/pull/77
2018-05-02 14:06:02 -07:00
Tim Keith
7f66c0ae72 [flang] Normalize namespace definitions.
Replace `namespace Fortran { namespace parser { ... } }` with
`namespace Fortran::parser { ... }` and similarly for semantics.

Original-commit: flang-compiler/f18@838c9539b2
Reviewed-on: https://github.com/flang-compiler/f18/pull/77
Tree-same-pre-rewrite: false
2018-05-02 13:52:36 -07:00
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
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
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
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