OSDN Git Service

* ja.po: Update.
[pf3gnuchains/gcc-fork.git] / libcpp / line-map.c
index cce699f..a82c428 100644 (file)
@@ -38,8 +38,8 @@ linemap_init (struct line_maps *set)
   set->trace_includes = false;
   set->depth = 0;
   set->cache = 0;
-  set->highest_location = 0;
-  set->highest_line = 0;
+  set->highest_location = RESERVED_LOCATION_COUNT - 1;
+  set->highest_line = RESERVED_LOCATION_COUNT - 1;
   set->max_column_hint = 0;
   set->reallocator = 0;
 }
@@ -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)