This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix LTO streaming of BUILTINS_LOCATION


Hi,
currently we stream BUILTINS_LOCATION by expanding it and streaming resulting
filename/line/col tripplet.  That is a nonsense and breaks some logic
that special case it.

This patch fixes it by special casing it same way as we do UNKNOWN_LOCATION
(we have precisely 2 special location codes, so doing compound bitpack is
not needed)

Bootstrapped/regtested ppc64le-linux, OK?

Honza

	* lto-streamer-out.c (lto_output_location): Correctly stream
	BUILTINS_LOCATION
	* lto-streamer-in (lto_input_location): Likewise.
Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c	(revision 224201)
+++ lto-streamer-out.c	(working copy)
@@ -205,6 +205,9 @@
   bp_pack_value (bp, loc == UNKNOWN_LOCATION, 1);
   if (loc == UNKNOWN_LOCATION)
     return;
+  bp_pack_value (bp, loc == BUILTINS_LOCATION, 1);
+  if (loc == BUILTINS_LOCATION)
+    return;
 
   xloc = expand_location (loc);
 
Index: lto-streamer-in.c
===================================================================
--- lto-streamer-in.c	(revision 224201)
+++ lto-streamer-in.c	(working copy)
@@ -283,6 +283,11 @@
       *loc = UNKNOWN_LOCATION;
       return;
     }
+  if (bp_unpack_value (bp, 1))
+    {
+      *loc = BUILTINS_LOCATION;
+      return;
+    }
   *loc = BUILTINS_LOCATION + 1;
 
   file_change = bp_unpack_value (bp, 1);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]