From 6c8e055c2d4ce7972fe1933d3e86a86b2c494df7 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 13 Apr 2016 12:03:31 -0400 Subject: [PATCH 80/91] FIXME: update linemaps in include handling --- gcc/read-md.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/read-md.c b/gcc/read-md.c index 29dba87..c2548ca 100644 --- a/gcc/read-md.c +++ b/gcc/read-md.c @@ -1138,7 +1138,10 @@ rtx_reader::handle_include (file_location loc) m_read_md_file = input_file; m_read_md_filename = pathname; - /* FIXME: update line_maps */ + m_current_linemap = + linemap_check_ordinary (linemap_add (m_line_table, LC_ENTER, 0, + pathname, 1)); + handle_file (); /* Restore the old cursor. */ @@ -1146,7 +1149,10 @@ rtx_reader::handle_include (file_location loc) m_read_md_filename = old_filename; m_read_md_lineno = old_lineno; m_read_md_colno = old_colno; - /* FIXME: update line_maps */ + + m_current_linemap = + linemap_check_ordinary (linemap_add (m_line_table, LC_LEAVE, 0, + NULL, 0)); /* Do not free the pathname. It is attached to the various rtx queue elements. */ @@ -1163,6 +1169,7 @@ rtx_reader::handle_file () int c; m_read_md_lineno = 1; + m_read_md_colno = 0; while ((c = read_skip_spaces ()) != EOF) { file_location loc = get_current_location (); -- 1.8.5.3