mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-13 20:01:00 +00:00

`Opt(flag, func, desc)` registers an option into `Action`. `OptClass<EmitterC>` is also available if `EmitterC(RK).run(OS)` is capable. `Action` is defined as `ManagedStatic<cl::opt>` to guarantee to be created when each registration of emitter is invoked. `llvm::TableGenMain(argv0, MainFn)` invokes `Action` instead of `MainFn` Differential Revision: https://reviews.llvm.org/D144351