40 enum class CodeFormat {
49 std::map<std::string, std::string> m_opts;
50 IRKind m_ir_kind_goal;
51 CodeFormat m_code_format_goal;
55 static constexpr
const char *PRINT_TOKENS =
"-l";
56 static constexpr
const char *PRINT_AST =
"-p";
57 static constexpr
const char *PRINT_SYMTAB =
"-a";
58 static constexpr
const char *OPTIMIZE =
"-o";
59 static constexpr
const char *PRINT_CFG =
"-C";
60 static constexpr
const char *HIGHLEVEL =
"-h";
61 static constexpr
const char *PRINT_DATAFLOW =
"-D";
63 static constexpr
const char *INCR_STRUCT_TYPE =
"-i";
64 static constexpr
const char *GRADUAL_FN_TYPE =
"-g";
65 static constexpr
const char *DEBUG_OPT =
"--debug-opts";
66 static constexpr
const char *ENABLE_PEEPHOLE_LL =
"--enable-peephole-ll";
76 int parse(
int argc,
char **argv);
80 bool has_option(
const std::string &opt_name)
const;
86 std::string get_arg(
const std::string &opt_name)
const;
90 IRKind get_ir_kind_goal()
const {
return m_ir_kind_goal; }
94 CodeFormat get_code_format_goal()
const {
return m_code_format_goal; }
96 std::string get_usage()
const;