aboutsummaryrefslogtreecommitdiff
path: root/gcc/line-map.c
diff options
context:
space:
mode:
authorPer Bothner <pbothner@apple.com>2003-03-20 16:43:19 +0000
committerPer Bothner <bothner@gcc.gnu.org>2003-03-20 08:43:19 -0800
commit8826ff0fcd12a506e2e91df9e4cae05747b88f13 (patch)
treebff4074818d1d2d8275592e02d37e804e47ed8c8 /gcc/line-map.c
parent015c318662801cd61e48698362d3d11151fbfdfa (diff)
downloadgcc-8826ff0fcd12a506e2e91df9e4cae05747b88f13.zip
gcc-8826ff0fcd12a506e2e91df9e4cae05747b88f13.tar.gz
gcc-8826ff0fcd12a506e2e91df9e4cae05747b88f13.tar.bz2
Various cleanups to help compile server.
* line-map.c (add_line_map): Allow leaving the outermost file. Allowing entering an outermost-file after the initial time. * toplev.c (pop_srcloc): Allow popping from initial file. From-SVN: r64616
Diffstat (limited to 'gcc/line-map.c')
-rw-r--r--gcc/line-map.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/line-map.c b/gcc/line-map.c
index ae26e76..442e314 100644
--- a/gcc/line-map.c
+++ b/gcc/line-map.c
@@ -106,9 +106,9 @@ add_line_map (set, reason, sysp, from_line, to_file, to_line)
if (MAIN_FILE_P (map - 1))
{
- error = true;
- reason = LC_RENAME;
- from = map - 1;
+ set->depth--;
+ set->used--;
+ return NULL;
}
else
{
@@ -139,8 +139,8 @@ add_line_map (set, reason, sysp, from_line, to_file, to_line)
if (reason == LC_ENTER)
{
+ map->included_from = set->depth == 0 ? -1 : (int) (set->used - 2);
set->depth++;
- map->included_from = set->used - 2;
if (set->trace_includes)
trace_include (set, map);
}