[all-commits] [llvm/llvm-project] 27b7d6: [clang][cli] Streamline MarshallingInfoFlag descri...
    Jan Svoboda via All-commits 
    all-commits at lists.llvm.org
       
    Mon Dec 21 02:33:39 PST 2020
    
    
  
  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 27b7d646886d499c70dec3481dfc3c82dfc43dd7
      https://github.com/llvm/llvm-project/commit/27b7d646886d499c70dec3481dfc3c82dfc43dd7
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2020-12-21 (Mon, 21 Dec 2020)
  Changed paths:
    M clang/include/clang/Driver/Options.td
    M llvm/include/llvm/Option/OptParser.td
  Log Message:
  -----------
  [clang][cli] Streamline MarshallingInfoFlag description
This replaces the existing `MarshallingInfoFlag<...>, IsNegative` with simpler `MarshallingInfoNegativeFlag`.
Reviewed By: dexonsmith
Original patch by Daniel Grumberg.
Differential Revision: https://reviews.llvm.org/D84675
  Commit: 70410a264949101ced3ce3458f37dd4cc2f5af85
      https://github.com/llvm/llvm-project/commit/70410a264949101ced3ce3458f37dd4cc2f5af85
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2020-12-21 (Mon, 21 Dec 2020)
  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/unittests/Frontend/CompilerInvocationTest.cpp
    M llvm/include/llvm/Option/OptParser.td
  Log Message:
  -----------
  [clang][cli] Let denormalizer decide how to render the option based on the option class
Before this patch, you needed to use `AutoNormalizeEnumJoined` whenever you wanted to **de**normalize joined enum.
Besides the naming confusion, this means the fact the option is joined is specified in two places: in the normalization multiclass and in the `Joined<["-"], ...>` multiclass.
This patch makes this work automatically, taking into account the `OptionClass` of options.
Also, the enum denormalizer now just looks up the spelling of the present enum case in a table and forwards it to the string denormalizer.
I also added more tests that exercise this.
Reviewed By: dexonsmith
Original patch by Daniel Grumberg.
Differential Revision: https://reviews.llvm.org/D84189
  Commit: 5a85526728c9e57efe26f322e4718fffd2634d23
      https://github.com/llvm/llvm-project/commit/5a85526728c9e57efe26f322e4718fffd2634d23
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2020-12-21 (Mon, 21 Dec 2020)
  Changed paths:
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Basic/LangOptions.h
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Frontend/InitPreprocessor.cpp
  Log Message:
  -----------
  [clang] Use enum for LangOptions::SYCLVersion instead of unsigned
`LangOptions::SYCLVersion` can only have two values. This patch introduces an enum that allows us to reduce the member size from 32 bits to 1 bit.
Consequently, this also makes marshalling of this option fit into our model for enums: D84674.
Reviewed By: bader
Differential Revision: https://reviews.llvm.org/D93540
Compare: https://github.com/llvm/llvm-project/compare/3bf7d47a977d...5a85526728c9
    
    
More information about the All-commits
mailing list