mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-16 15:04:46 +00:00
First pass clean reading API.
* include/abg-reader.h (read_file): Remove extraneous file parameter. * src/abg-reader.cc: Same. * tests/test-read-write.cc: Adjust.
This commit is contained in:
parent
f7fd078486
commit
32ce30a23c
@ -31,7 +31,7 @@ namespace abigail
|
||||
namespace reader
|
||||
{
|
||||
bool
|
||||
read_file(const std::string& file_path, translation_unit& tu);
|
||||
read_file(translation_unit& tu);
|
||||
}// end namespace reader
|
||||
}// end namespace abigail
|
||||
|
||||
|
@ -486,10 +486,9 @@ static bool handle_function_template_decl(read_context&);
|
||||
static bool handle_class_template_decl(read_context&);
|
||||
|
||||
bool
|
||||
read_file(const string& file_path,
|
||||
translation_unit& tu)
|
||||
read_file(translation_unit& tu)
|
||||
{
|
||||
read_context read_ctxt(xml::new_reader_from_file(file_path));
|
||||
read_context read_ctxt(xml::new_reader_from_file(tu.get_path()));
|
||||
|
||||
return read_input(read_ctxt, tu);
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ main()
|
||||
string input_suffix(s->in_path);
|
||||
in_path = abigail::tests::get_src_dir() + "/tests/" + input_suffix;
|
||||
abigail::translation_unit tu(input_suffix);
|
||||
if (!abigail::reader::read_file(in_path, tu))
|
||||
if (!abigail::reader::read_file(tu))
|
||||
{
|
||||
cerr << "failed to read " << in_path << "\n";
|
||||
is_ok = false;
|
||||
|
@ -50,7 +50,7 @@ main(int argc, char **argv)
|
||||
string file_name = argv[1];
|
||||
|
||||
abigail::translation_unit tu(file_name);
|
||||
if (!abigail::reader::read_file(file_name, tu))
|
||||
if (!abigail::reader::read_file(tu))
|
||||
{
|
||||
cerr << "failed to read " << file_name << "\n";
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user