[all-commits] [llvm/llvm-project] a7c08b: [flang][driver] Add support for `-mllvm`

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Wed Mar 16 03:41:21 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a7c08bcf777ee0712c140052d0814f55a02dd27b
      https://github.com/llvm/llvm-project/commit/a7c08bcf777ee0712c140052d0814f55a02dd27b
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2022-03-16 (Wed, 16 Mar 2022)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Flang.cpp
    M flang/include/flang/Frontend/FrontendOptions.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
    M flang/test/Driver/driver-help-hidden.f90
    M flang/test/Driver/driver-help.f90
    A flang/test/Driver/mllvm.f90

  Log Message:
  -----------
  [flang][driver] Add support for `-mllvm`

This option is added in both `flang-new` (the compiler driver) and
`flang-new -fc1` (the frontend driver). The semantics are consistent
with `clang` and `clang -cc1`.

As Flang does not run any LLVM passes when invoked with `-emit-llvm`
(i.e. `flang-new -S -emit-llvm <file>`), the tests use
`-S`/`-c`/`-emit-obj` instead. These options require an LLVM backend to
be run by the driver to generate the output (this makese `-mllvm`
relevant here).

Differential Revision: https://reviews.llvm.org/D121374




More information about the All-commits mailing list