[all-commits] [llvm/llvm-project] ba0006: [flang][driver] Fix reading from stdin when using ...
Andrzej WarzyĆski via All-commits
all-commits at lists.llvm.org
Thu Feb 4 08:53:09 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ba000628bdbddfe1ec37da9aa7aa2d19f03cb3a4
https://github.com/llvm/llvm-project/commit/ba000628bdbddfe1ec37da9aa7aa2d19f03cb3a4
Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: 2021-02-04 (Thu, 04 Feb 2021)
Changed paths:
M flang/lib/Frontend/FrontendActions.cpp
A flang/test/Flang-Driver/input-from-stdin.f90
Log Message:
-----------
[flang][driver] Fix reading from stdin when using `-test-io`
This patch adds logic in the InputOutputTestAction frontend action for
reading input from stdin. Without this patch the following fails:
```
flang-new -fc1 -test-io -
```
The implementation of `InputOutputTestAction` is cleaned-up and a test
for reading from stdin is added.
Note that there's a difference between `-test-io` and e.g. `-E` in terms
of file I/O. The frontend action for the former handles all file I/O on
it's own. Conversely, the action corresponding to -E relies on the
prescanner API to handle this.
Currently we can't test reading from stdin for `flang-new -`. In this
case `libclangDriver` assumes `-x -c`. This in turn leads to `flang-new
-cc1`, which is not supported.
More information about the All-commits
mailing list