Fix the use of linemap_add and remove unnecessary kludge
authorDodji Seketeli <dodji@redhat.com>
Sun, 28 Aug 2011 20:14:46 +0000 (20:14 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Sun, 28 Aug 2011 20:14:46 +0000 (22:14 +0200)
commit892a371f3b8c8ce79f59540908a8660cfc07f880
treeeceb7d4375de4bb00babcce955c7e39bab611ff1
parente90abaa0a28ccc5581f5b7c7abc789c8fb84764c
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
gcc/c-family/ChangeLog
gcc/c-family/c-pch.c
gcc/fortran/ChangeLog
gcc/fortran/scanner.c
gcc/lto/ChangeLog
gcc/lto/lto-lang.c
libcpp/ChangeLog
libcpp/line-map.c