1. [clang][driver] Add basic --driver-mode=flang support for fortran (details)
Commit 6bf55804924d5a1d902925ad080b1a2b57c5c75c by peter.waller
[clang][driver] Add basic --driver-mode=flang support for fortran
This patch adds a new Flang mode. When in Flang mode, the driver will
invoke flang for fortran inputs instead of falling back to the GCC
toolchain as it would otherwise do.
The behaviour of other driver modes are left unmodified to preserve
backwards compatibility.
It is intended that a soon to be implemented binary in the flang project
will import libclangDriver and run the clang driver in the new flang
Please note that since the binary invoked by the driver is under
development, there will no doubt be further tweaks necessary in future
* Initial support is added for basic driver phases
* -E, -fsyntax-only, -emit-llvm -S, -emit-llvm, -S, (none specified)
* -### tests are added for all of the above
* This is more than is supported by f18 so far, which will emit errors
   for those options which are unimplemented.
* A test is added that ensures that clang gives a reasonable error
message if flang is not available in the path (without -###).
* Test that the driver accepts multiple inputs in --driver-mode=flang.
* Test that a combination of C and Fortran inputs run both clang and
flang in --driver-mode=flang.
* clang/test/Driver/fortran.f95 is fixed to use the correct fortran
comment character.
Differential revision:
The file was addedclang/test/Driver/flang/multiple-inputs.f90
The file was addedclang/lib/Driver/ToolChains/Flang.h
The file was addedclang/test/Driver/flang/flang.F90
The file was addedclang/test/Driver/flang/Inputs/two.f90
The file was addedclang/test/Driver/flang/multiple-inputs-mixed.f90
The file was modifiedclang/test/Driver/fortran.f95
The file was modifiedclang/include/clang/Driver/Types.h
The file was modifiedclang/lib/Driver/Types.cpp
The file was addedclang/test/Driver/flang/Inputs/one.f90
The file was modifiedclang/include/clang/Driver/ToolChain.h
The file was modifiedclang/lib/Driver/Driver.cpp
The file was addedclang/lib/Driver/ToolChains/Flang.cpp
The file was modifiedclang/include/clang/Driver/Driver.h
The file was addedclang/test/Driver/flang/Inputs/other.c
The file was modifiedclang/lib/Driver/CMakeLists.txt
The file was modifiedclang/test/Driver/lit.local.cfg
The file was modifiedclang/lib/Driver/ToolChain.cpp
The file was addedclang/test/Driver/flang/flang.f90