* [lto][patch] Add missing ifdef LTO_DEBUG_ENABLEDs
@ 2008-07-01 16:26 Simon Baldwin
2008-07-02 16:16 ` Diego Novillo
0 siblings, 1 reply; 2+ messages in thread
From: Simon Baldwin @ 2008-07-01 16:26 UTC (permalink / raw)
To: gcc-patches
This patch adds a couple of extra #ifdef's that are otherwise missing around
data items present only when LTO stream debugging has been enabled. When
patched, the LTO branch builds cleanly with LTO_STREAM_DEBUGGING undefined.
gcc/ChangeLog
2008-07-01 Simon Baldwin <simonb@google.com>
* lto-function-in.c (lto_read_body): Wrapped debug-only data items
within #ifdef LTO_STREAM_DEBUGGING.
* lto-section-out.c (produce_asm_for_decls): Ditto.
gcc/lto/ChangeLog:
2008-07-01 Simon Baldwin <simonb@google.com>
* lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
LTO_STREAM_DEBUGGING.
Index: gcc/lto-function-in.c
===================================================================
--- gcc/lto-function-in.c (revision 137321)
+++ gcc/lto-function-in.c (working copy)
@@ -2335,7 +2335,9 @@
{
free (data_in.labels);
free (data_in.local_decls_index);
+#ifdef LTO_STREAM_DEBUGGING
free (data_in.local_decls_index_d);
+#endif
}
}
Index: gcc/lto/lto.c
===================================================================
--- gcc/lto/lto.c (revision 137321)
+++ gcc/lto/lto.c (working copy)
@@ -182,7 +182,9 @@
int i;
LTO_INIT_INPUT_BLOCK (ib_main, data + main_offset, 0, header->main_size);
+#ifdef LTO_STREAM_DEBUGGING
LTO_INIT_INPUT_BLOCK (debug_main, data + debug_main_offset, 0, header->debug_main_size);
+#endif
decl_data->field_decls = xcalloc (header->num_field_decls, sizeof (tree));
decl_data->fn_decls = xcalloc (header->num_fn_decls, sizeof (tree));
Index: gcc/lto-section-out.c
===================================================================
--- gcc/lto-section-out.c (revision 137321)
+++ gcc/lto-section-out.c (working copy)
@@ -887,7 +887,9 @@
header.main_size = ob->main_stream->total_size;
header.string_size = ob->string_stream->total_size;
+#ifdef LTO_STREAM_DEBUGGING
header.debug_main_size = ob->debug_main_stream->total_size;
+#endif
header_stream = xcalloc (1, sizeof (struct lto_output_stream));
lto_output_data_stream (header_stream, &header, sizeof header);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [lto][patch] Add missing ifdef LTO_DEBUG_ENABLEDs
2008-07-01 16:26 [lto][patch] Add missing ifdef LTO_DEBUG_ENABLEDs Simon Baldwin
@ 2008-07-02 16:16 ` Diego Novillo
0 siblings, 0 replies; 2+ messages in thread
From: Diego Novillo @ 2008-07-02 16:16 UTC (permalink / raw)
To: Simon Baldwin; +Cc: gcc-patches
On Tue, Jul 1, 2008 at 12:09, Simon Baldwin <simonb@google.com> wrote:
> gcc/ChangeLog
> 2008-07-01 Simon Baldwin <simonb@google.com>
>
> * lto-function-in.c (lto_read_body): Wrapped debug-only data items
> within #ifdef LTO_STREAM_DEBUGGING.
> * lto-section-out.c (produce_asm_for_decls): Ditto.
>
> gcc/lto/ChangeLog:
> 2008-07-01 Simon Baldwin <simonb@google.com>
>
> * lto.c (lto_read_decls): Wrapped debug-only data items within #ifdef
> LTO_STREAM_DEBUGGING.
OK.
Diego.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-02 16:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-01 16:26 [lto][patch] Add missing ifdef LTO_DEBUG_ENABLEDs Simon Baldwin
2008-07-02 16:16 ` Diego Novillo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).