Lines Matching defs:opts
508 parse_command_line(int argc, char* argv[], options& opts)
512 opts.read_from_stdin = true;
520 if (opts.file_path.empty())
521 opts.file_path = argv[i];
530 opts.display_version = true;
540 opts.di_root_path =
550 opts.headers_dir = argv[j];
559 opts.header_files.push_back(argv[j]);
568 opts.wrong_option = argv[i];
571 opts.suppression_paths.push_back(argv[j]);
575 opts.read_from_stdin = true;
577 opts.read_tu = true;
580 opts.use_ctf = true;
583 opts.diff = true;
585 opts.noout = true;
592 opts.type_id_to_show = argv[i];
598 opts.wrong_option = argv[i];
604 if (!opts.type_id_to_show.empty()
605 && opts.file_path.empty())
610 if (opts.file_path.empty()
611 && opts.type_id_to_show.empty())
612 opts.read_from_stdin = true;
615 if (opts.read_from_stdin && !opts.file_path.empty())
619 << opts.file_path << " will be ignored automatically\n";
628 /// @param opts the options instance to use.
633 maybe_check_suppression_files(const options& opts)
635 for (vector<string>::const_iterator i = opts.suppression_paths.begin();
636 i != opts.suppression_paths.end();
658 /// @param opts the options where to get the suppression
661 set_suppressions(abigail::fe_iface& reader, const options& opts)
664 for (vector<string>::const_iterator i = opts.suppression_paths.begin();
665 i != opts.suppression_paths.end();
670 abigail::tools_utils::gen_suppr_spec_from_headers(opts.headers_dir,
671 opts.header_files);
683 options opts;
684 if (!parse_command_line(argc, argv, opts))
686 if (!opts.wrong_option.empty())
688 << "unrecognized option: " << opts.wrong_option << "\n";
693 if (opts.display_version)
701 if (!maybe_check_suppression_files(opts))
705 if (opts.read_from_stdin)
710 if (opts.read_tu)
722 if (!opts.noout)
735 set_suppressions(*rdr, opts);
738 if (!opts.noout)
747 else if (!opts.file_path.empty())
749 if (!check_file(opts.file_path, cerr, argv[0]))
756 file_type type = guess_file_type(opts.file_path);
762 << "Unknown file type given in input: " << opts.file_path
768 abigail::abixml::create_reader(opts.file_path,
776 di_root_path = opts.di_root_path.get();
781 if (opts.use_ctf)
783 abigail::ctf::create_reader(opts.file_path,
788 abigail::dwarf::create_reader(opts.file_path,
791 set_suppressions(*rdr, opts);
798 abigail::abixml::create_reader(opts.file_path, env);
800 set_suppressions(*rdr, opts);
807 abigail::abixml::create_reader(opts.file_path, env);
809 set_suppressions(*rdr, opts);
828 << "failed to read " << opts.file_path << "\n";
848 << opts.file_path
864 std::ostream& of = opts.diff ? tmp_file->get_stream() : cout;
871 if (!opts.noout)
880 if (!opts.noout)
898 << opts.file_path << " back\n";
902 && opts.diff
907 string cmd = "diff -u " + opts.file_path + " " + tmp_file->get_path();
914 && !opts.type_id_to_show.empty())
917 show_how_type_is_used(*abixml_read_ctxt, opts.type_id_to_show);