[all-commits] [llvm/llvm-project] 3f092f: [llvm] Extract common `OptTable` bits into macros
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Fri Aug 4 14:01:11 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3f092f37b7362447cbb13f5502dae4bdd5762afd
https://github.com/llvm/llvm-project/commit/3f092f37b7362447cbb13f5502dae4bdd5762afd
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2023-08-04 (Fri, 04 Aug 2023)
Changed paths:
M clang/include/clang/Driver/Options.h
M clang/lib/Driver/DriverOptions.cpp
M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
M clang/tools/clang-scan-deps/ClangScanDeps.cpp
M lld/COFF/Driver.h
M lld/COFF/DriverUtils.cpp
M lld/ELF/Driver.h
M lld/ELF/DriverUtils.cpp
M lld/MachO/Driver.h
M lld/MinGW/Driver.cpp
M lld/wasm/Driver.cpp
M lldb/tools/driver/Driver.cpp
M lldb/tools/lldb-server/lldb-gdbserver.cpp
M lldb/tools/lldb-vscode/lldb-vscode.cpp
M llvm/include/llvm/Option/OptTable.h
M llvm/lib/ExecutionEngine/JITLink/COFFDirectiveParser.cpp
M llvm/lib/ExecutionEngine/JITLink/COFFDirectiveParser.h
M llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
M llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
M llvm/tools/dsymutil/dsymutil.cpp
M llvm/tools/llvm-cvtres/llvm-cvtres.cpp
M llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
M llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
M llvm/tools/llvm-dwarfutil/llvm-dwarfutil.cpp
M llvm/tools/llvm-dwp/llvm-dwp.cpp
M llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
M llvm/tools/llvm-ifs/llvm-ifs.cpp
M llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
M llvm/tools/llvm-lipo/llvm-lipo.cpp
M llvm/tools/llvm-ml/llvm-ml.cpp
M llvm/tools/llvm-mt/llvm-mt.cpp
M llvm/tools/llvm-nm/llvm-nm.cpp
M llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
M llvm/tools/llvm-objdump/ObjdumpOptID.h
M llvm/tools/llvm-objdump/llvm-objdump.cpp
M llvm/tools/llvm-rc/llvm-rc.cpp
M llvm/tools/llvm-readobj/llvm-readobj.cpp
M llvm/tools/llvm-size/llvm-size.cpp
M llvm/tools/llvm-strings/llvm-strings.cpp
M llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
M llvm/tools/llvm-tli-checker/llvm-tli-checker.cpp
M llvm/tools/sancov/sancov.cpp
M llvm/unittests/Option/OptionParsingTest.cpp
Log Message:
-----------
[llvm] Extract common `OptTable` bits into macros
All command-line tools using `llvm::opt` create an enum of option IDs and a table of `OptTable::Info` object. Most of the tools use the same ID (`OPT_##ID`), kind (`Option::KIND##Class`), group ID (`OPT_##GROUP`) and alias ID (`OPT_##ALIAS`). This patch extracts that common code into canonical macros. This results in fewer changes when tweaking the `OPTION` macros emitted by the TableGen backend.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D157028
More information about the All-commits
mailing list