aboutsummaryrefslogtreecommitdiff
path: root/gcc/line-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/line-map.c')
-rw-r--r--gcc/line-map.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/line-map.c b/gcc/line-map.c
index f3c2369..50c9c88 100644
--- a/gcc/line-map.c
+++ b/gcc/line-map.c
@@ -96,9 +96,15 @@ linemap_add (struct line_maps *set, enum lc_reason reason,
if (MAIN_FILE_P (map - 1))
{
- set->depth--;
- set->used--;
- return NULL;
+ if (to_file == NULL)
+ {
+ set->depth--;
+ set->used--;
+ return NULL;
+ }
+ error = true;
+ reason = LC_RENAME;
+ from = map - 1;
}
else
{