[all-commits] [llvm/llvm-project] d8a8e5: [clang][cli] Remove marshalling from Opt{In, Out}FFlag

Jan Svoboda via All-commits all-commits at lists.llvm.org
Thu Feb 25 00:00:37 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d8a8e5d6240a1db809cd95106910358e69bbf299
      https://github.com/llvm/llvm-project/commit/d8a8e5d6240a1db809cd95106910358e69bbf299
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2021-02-25 (Thu, 25 Feb 2021)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Frontend/CompilerInvocation.cpp

  Log Message:
  -----------
  [clang][cli] Remove marshalling from Opt{In,Out}FFlag

We can now express all marshalling semantics in `Opt{In,Out}FFlag` via `BoolFOption`.

This patch moves remaining `Opt{In,Out}FFlag` instances using marshalling to `BoolFOption` and removes marshalling capabilities from `Opt{In,Out}FFlag` entirely.

This simplifies the decisions developers have to make when creating new boolean options:
  * For simple cc1 flag pairs, use `Bool{,F,G}Option`.
  * For cc1 flag pairs that require complex marshalling logic, use `Opt{In,Out}FFlag` and implement marshalling manually.

Reviewed By: dexonsmith

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




More information about the All-commits mailing list