mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 23:26:04 +00:00

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
14 lines
378 B
C
14 lines
378 B
C
#ifndef LLVM_TOOLS_LLVM_OBJDUMP_OBJDUMP_OPT_ID_H
|
|
#define LLVM_TOOLS_LLVM_OBJDUMP_OBJDUMP_OPT_ID_H
|
|
|
|
#include "llvm/Option/OptTable.h"
|
|
|
|
enum ObjdumpOptID {
|
|
OBJDUMP_INVALID = 0, // This is not an option ID.
|
|
#define OPTION(...) LLVM_MAKE_OPT_ID_WITH_ID_PREFIX(OBJDUMP_, __VA_ARGS__),
|
|
#include "ObjdumpOpts.inc"
|
|
#undef OPTION
|
|
};
|
|
|
|
#endif // LLVM_TOOLS_LLVM_OBJDUMP_OBJDUMP_OPT_ID_H
|