diff options
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r-- | libcpp/line-map.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c index cce699f3cfea..553cc2ab605e 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -109,9 +109,12 @@ linemap_add (struct line_maps *set, enum lc_reason reason, map = &set->maps[set->used]; - if (to_file && *to_file == '\0') + if (to_file && *to_file == '\0' && reason != LC_RENAME_VERBATIM) to_file = "<stdin>"; + if (reason == LC_RENAME_VERBATIM) + reason = LC_RENAME; + /* If we don't keep our line maps consistent, we can easily segfault. Don't rely on the client to do it for us. */ if (set->depth == 0) |