Use file_location for md_reader's ptr_loc
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 16 Jul 2019 08:41:13 +0000 (08:41 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 16 Jul 2019 08:41:13 +0000 (08:41 +0000)
commit737eb76789cd454918a85983255a1f62efcbfdc9
tree773f9d2b59bf22303b127b0ea01775a5f7e4e344
parentf6e5e4b83b153d056b93048fd23b4afebcd49bcf
Use file_location for md_reader's ptr_loc

Also make it public, so that clients can use the location for error
reporting.

2019-07-16  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* read-md.h (md_reader::ptr_loc): Moved from read-md.c.
Use file_location instead of separate fields.
(md_reader::set_md_ptr_loc): Take a file_location instead of a
separate filename and line number.
* read-md.c (ptr_loc): As above.
(md_reader::copy_md_ptr_loc): Update for new ptr_loc layout.
(md_reader::fprint_md_ptr_loc): Likewise.
(md_reader::set_md_ptr_loc): Likewise.  Take a file_location
instead of a separate filename and line number.
(md_reader::read_string): Update call accordingly.

From-SVN: r273510
gcc/ChangeLog
gcc/read-md.c
gcc/read-md.h