| 636 | } |
| 637 | |
| 638 | void CheckFlags(const Options& opts) { |
| 639 | int nonempty_flags_amount = 0; |
| 640 | if (!opts.hlo_proto.empty()) { |
| 641 | ++nonempty_flags_amount; |
| 642 | } |
| 643 | if (!opts.hlo_snapshot.empty()) { |
| 644 | ++nonempty_flags_amount; |
| 645 | } |
| 646 | if (!opts.hlo_text.empty()) { |
| 647 | ++nonempty_flags_amount; |
| 648 | } |
| 649 | if (nonempty_flags_amount == 1) { |
| 650 | return; |
| 651 | } |
| 652 | LOG(FATAL) << "Can only specify one and only one of '--hlo_proto', " |
| 653 | "'--hlo_snapshot', '--hlo_text' flags."; |
| 654 | } |
| 655 | |
| 656 | void RealMain(const Options& opts) { |
| 657 | if (!isatty(fileno(stdin))) { |