summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-pch.c
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-22 16:00:32 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-22 16:00:32 +0000
commit915e0b4d156e533935055c5da230f7121c17490d (patch)
tree6c73ea9257762c2a185d1067428e3ffbf54f4956 /gcc/c-family/c-pch.c
parentdcad2431894108760a5351f5e668d1afa77c8344 (diff)
downloadgcc-915e0b4d156e533935055c5da230f7121c17490d.tar.gz
Avoid dangling line table after loading pch
gcc/ * c-family/c-pch.c (c_common_read_pch): Re-set line table right after reading in the pch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-pch.c')
-rw-r--r--gcc/c-family/c-pch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c
index b429d9d7713..3c2fd18f063 100644
--- a/gcc/c-family/c-pch.c
+++ b/gcc/c-family/c-pch.c
@@ -431,6 +431,7 @@ c_common_read_pch (cpp_reader *pfile, const char *name,
timevar_pop (TV_PCH_CPP_RESTORE);
gt_pch_restore (f);
+ cpp_set_line_map (pfile, line_table);
timevar_push (TV_PCH_CPP_RESTORE);
if (cpp_read_state (pfile, name, f, smd) != 0)
@@ -445,7 +446,6 @@ c_common_read_pch (cpp_reader *pfile, const char *name,
fclose (f);
line_table->trace_includes = saved_trace_includes;
- cpp_set_line_map (pfile, line_table);
linemap_add (line_table, LC_RENAME, 0, saved_loc.file, saved_loc.line);
/* Give the front end a chance to take action after a PCH file has