Files
revng-revng/python/revng/cli/_commands/opt.py
T
Giacomo Vercesi 1a7503183a revng.cli: dynamically load commands
Now `revng.cli` houses the core command-line driver while the individual
commands have been moved to `revng.cli._commands` and are dynamically
loaded.
2022-07-28 08:48:30 +02:00

21 lines
597 B
Python

#
# This file is distributed under the MIT License. See LICENSE.md for details.
#
from revng.cli.commands_registry import Command, Options
from revng.cli.support import build_command_with_loads, run
class IROptCommand(Command):
def __init__(self):
super().__init__(("opt",), "LLVM's opt with rev.ng passes", False)
def register_arguments(self, parser):
pass
def run(self, options: Options):
opt_command = build_command_with_loads(
"opt", options.remaining_args + ["-serialize-model"], options
)
return run(opt_command, options)