[PATCH] D121374: [flang][driver] Add support for `-mllvm`

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 10 04:27:19 PST 2022


awarzynski created this revision.
awarzynski added reviewers: rovka, schweitz, Leporacanthicus, kiranchandramohan, shraiysh.
Herald added a reviewer: sscalpone.
Herald added a subscriber: dang.
Herald added projects: Flang, All.
awarzynski requested review of this revision.
Herald added subscribers: cfe-commits, jdoerfert.
Herald added a project: clang.

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).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121374

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121374.414342.patch
Type: text/x-patch
Size: 7020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220310/dd08baa2/attachment.bin>


More information about the cfe-commits mailing list