| 232 | } |
| 233 | |
| 234 | int main(int argc, char** argv) { |
| 235 | cl::AddExtraVersionPrinter( |
| 236 | [](raw_ostream& oss) { oss << megcc::getMegccVersionString(); }); |
| 237 | cl::ParseCommandLineOptions(argc, argv); |
| 238 | std::string model_path = InputFile.getValue(); |
| 239 | std::unique_ptr<serialization::InputFile> inp_file = |
| 240 | serialization::InputFile::make_fs(model_path.c_str()); |
| 241 | auto format = serialization::GraphLoader::identify_graph_dump_format(*inp_file); |
| 242 | mgb_assert(format.valid(), "invalid model: unknown model format"); |
| 243 | auto loader = serialization::GraphLoader::make(std::move(inp_file), format.val()); |
| 244 | serialization::GraphLoadConfig load_config; |
| 245 | auto result = loader->load(load_config, false); |
| 246 | run(result, verboseOpt.getValue()); |
| 247 | return 0; |
| 248 | } |
| 249 | |
| 250 | // vim: syntax=cpp.doxygen |