diff options
author | Dodji Seketeli <dodji@redhat.com> | 2011-08-28 20:14:46 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2011-08-28 22:14:46 +0200 |
commit | 892a371f3b8c8ce79f59540908a8660cfc07f880 (patch) | |
tree | eceb7d4375de4bb00babcce955c7e39bab611ff1 /gcc/lto | |
parent | e90abaa0a28ccc5581f5b7c7abc789c8fb84764c (diff) | |
download | gcc-892a371f3b8c8ce79f59540908a8660cfc07f880.tar.gz |
Fix the use of linemap_add and remove unnecessary kludge
libcpp/
* line-map.c (linemap_add): Assert that reason must not be
LC_RENAME when called for the first time on a "main input file".
c-family/
* c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as it's
the first time it's being called on this main TU.
gcc/lto/
* lto-lang.c (lto_init): Likewise. Also, avoid calling
linemap_add twice.
gcc/fortran/
* scanner.c (load_file): Don't abuse LC_RENAME reason while
(indirectly) calling linemap_add.
From-SVN: r178146
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto-lang.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 48903907e00..6e1e187e0c4 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2011-08-28 Dodji Seketeli <dodji@redhat.com> + + * lto-lang.c (lto_init): Likewise. Also, avoid calling + linemap_add twice. + 2011-08-11 Martin Jambor <mjambor@suse.cz> * lto.c (uniquify_nodes): Use main variant's BINFO too. diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index 83c41e6c1aa..d469fb93b6a 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -1081,8 +1081,7 @@ lto_init (void) flag_generate_lto = flag_wpa; /* Initialize libcpp line maps for gcc_assert to work. */ - linemap_add (line_table, LC_RENAME, 0, NULL, 0); - linemap_add (line_table, LC_RENAME, 0, NULL, 0); + linemap_add (line_table, LC_ENTER, 0, NULL, 0); /* Create the basic integer types. */ build_common_tree_nodes (flag_signed_char, /*short_double=*/false); |