read-md.c: track column numbers
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 4 Oct 2016 17:10:41 +0000 (17:10 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 4 Oct 2016 17:10:41 +0000 (17:10 +0000)
commit3814e88007d6d9abfbdfd53dbcdc92fe1aed23de
tree674c22b9fe8aab5e932b8be9edc880125ec3af7d
parentf72da967576271070086b2252a8463bb69f93abd
read-md.c: track column numbers

gcc/ChangeLog:
* genattrtab.c (make_internal_attr): Supply dummy column number to
file_location ctor.
(main): Likewise.
* genoutput.c (init_insn_for_nothing): Likewise.
* gensupport.c (add_define_attr): Likewise.
* read-md.c (message_at_1): Print column number.
(fatal_with_file_and_line): Likewise.
(rtx_reader::read_char): Track column numbers.
(rtx_reader::unread_char): Likewise.
(rtx_reader::rtx_reader): Initialize m_read_md_colno.
(rtx_reader::handle_include): Stash and restore m_read_md_colno.
(rtx_reader::handle_file): Initialize m_read_md_colno.
(rtx_reader::get_current_location): Supply column number to
file_location ctor.
* read-md.h (struct file_location): Add field "colno".
(file_location::file_location): Likewise.
(rtx_reader::get_colno): New accessor.
(rtx_reader::m_read_md_colno): New field.
(rtx_reader::m_last_line_colno): New field.

From-SVN: r240752
gcc/ChangeLog
gcc/genattrtab.c
gcc/genoutput.c
gcc/gensupport.c
gcc/read-md.c
gcc/read-md.h