diff options
author | Dodji Seketeli <dodji@redhat.com> | 2011-08-22 16:00:32 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2011-08-22 18:00:32 +0200 |
commit | 671d9f12cf59f7084a4b5d30865d1bf2d01b08a2 (patch) | |
tree | 6c73ea9257762c2a185d1067428e3ffbf54f4956 /gcc | |
parent | b0894e1f4f17208c2a0c60c9636f3621d28dfcce (diff) | |
download | gcc-671d9f12cf59f7084a4b5d30865d1bf2d01b08a2.zip gcc-671d9f12cf59f7084a4b5d30865d1bf2d01b08a2.tar.gz gcc-671d9f12cf59f7084a4b5d30865d1bf2d01b08a2.tar.bz2 |
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.
From-SVN: r177964
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/c-pch.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index afe1973..2236354 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-08-22 Dodji Seketeli <dodji@redhat.com> + + * c-family/c-pch.c (c_common_read_pch): Re-set line table right + after reading in the pch. + 2011-08-22 H.J. Lu <hongjiu.lu@intel.com> * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Error if __ELF__ isn't diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c index b429d9d..3c2fd18 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 |