aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2008-06-03 23:19:09 +0000
committerDiego Novillo <dnovillo@google.com>2008-06-03 23:19:09 +0000
commit55b5aefe0dcf7759b73f9dd8a2c31fc8aa19700d (patch)
treec6ec30bce0659fd991f35669ce7e4b1bba31af43
parentcd48677ec09b5c43c576fe0b0a56cf6b82c53ef2 (diff)
2008-06-03 Diego Novillo <dnovillo@google.com>
* lto-header.h: Tidy formatting. * lto-section-in.c (lto_get_section_data): Fix type for SECTION_NAME. (lto_debug_in_fun): Tidy formatting. * lto-tags.h (enum): Tidy formatting. * lto-cgraph-out.c (output_fn_decl): Add comment. * lto-section-out.c (lto_output_decl_index): Tidy formatting. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto-streamer@136343 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.lto10
-rw-r--r--gcc/lto-cgraph-out.c2
-rw-r--r--gcc/lto-header.h18
-rw-r--r--gcc/lto-section-in.c17
-rw-r--r--gcc/lto-section-out.c4
-rw-r--r--gcc/lto-tags.h26
6 files changed, 50 insertions, 27 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto
index d4811263f17..3472991695e 100644
--- a/gcc/ChangeLog.lto
+++ b/gcc/ChangeLog.lto
@@ -1,5 +1,15 @@
2008-06-03 Diego Novillo <dnovillo@google.com>
+ * lto-header.h: Tidy formatting.
+ * lto-section-in.c (lto_get_section_data): Fix type for
+ SECTION_NAME.
+ (lto_debug_in_fun): Tidy formatting.
+ * lto-tags.h (enum): Tidy formatting.
+ * lto-cgraph-out.c (output_fn_decl): Add comment.
+ * lto-section-out.c (lto_output_decl_index): Tidy formatting.
+
+2008-06-03 Diego Novillo <dnovillo@google.com>
+
* lto-function-out.c (output_tree_flags): Tidy
formatting.
(output_type_decl): Emit TYPE_MODE.
diff --git a/gcc/lto-cgraph-out.c b/gcc/lto-cgraph-out.c
index 48d56dcd0aa..c9a9e3bb8fb 100644
--- a/gcc/lto-cgraph-out.c
+++ b/gcc/lto-cgraph-out.c
@@ -123,6 +123,8 @@ output_sleb128 (struct output_block *ob, HOST_WIDE_INT work)
}
+/* Output FUNCTION_DECL EXPR to output block OB. */
+
static void
output_fn_decl (struct output_block *ob, tree expr)
{
diff --git a/gcc/lto-header.h b/gcc/lto-header.h
index f8af9d3817c..73eb587d3e4 100644
--- a/gcc/lto-header.h
+++ b/gcc/lto-header.h
@@ -91,15 +91,15 @@ struct lto_debug_context
{
lto_debug_out out;
int indent;
- void * current_data;
- void * decl_index_data;
- void * decl_data;
- void * label_data;
- void * ssa_names_data;
- void * cfg_data;
- void * main_data;
- const char * stream_name;
- const char ** tag_names;
+ void *current_data;
+ void *decl_index_data;
+ void *decl_data;
+ void *label_data;
+ void *ssa_names_data;
+ void *cfg_data;
+ void *main_data;
+ const char *stream_name;
+ const char **tag_names;
};
extern struct lto_debug_context lto_debug_context;
diff --git a/gcc/lto-section-in.c b/gcc/lto-section-in.c
index a09879614fe..7d90b094194 100644
--- a/gcc/lto-section-in.c
+++ b/gcc/lto-section-in.c
@@ -236,15 +236,16 @@ lto_get_section_data (struct lto_file_decl_data *file_data,
htab_t section_hash_table = file_data->section_hash_table;
struct lto_section_slot *f_slot;
struct lto_section_slot s_slot;
- const char *section_name = lto_get_section_name (section_type, name);
+ char *section_name = lto_get_section_name (section_type, name);
char * data = NULL;
s_slot.name = section_name;
f_slot = (struct lto_section_slot *)htab_find (section_hash_table, &s_slot);
if (f_slot)
- data = lto_read_section_data (file_data->file_name, f_slot->start, f_slot->len);
+ data = lto_read_section_data (file_data->file_name, f_slot->start,
+ f_slot->len);
- free ((char *)section_name);
+ free (section_name);
return data;
}
@@ -315,14 +316,16 @@ dump_debug_stream (struct lto_input_block *stream,
This call checks that the debugging information generated by
lto-function-out matches the debugging information generated by the
reader. Each character is checked and a call to abort is generated
- when the first mismatch is found.
- */
+ when the first mismatch is found. */
void
lto_debug_in_fun (struct lto_debug_context *context, char c)
{
- struct lto_input_block *stream = (struct lto_input_block *)context->current_data;
- char b = lto_input_1_unsigned (stream);
+ struct lto_input_block *stream;
+ char b;
+
+ stream = (struct lto_input_block *) context->current_data;
+ b = lto_input_1_unsigned (stream);
if (b != c)
{
diff --git a/gcc/lto-section-out.c b/gcc/lto-section-out.c
index 0f5b88ef41a..97a32a33d24 100644
--- a/gcc/lto-section-out.c
+++ b/gcc/lto-section-out.c
@@ -374,12 +374,12 @@ lto_output_integer_stream (struct lto_output_stream *obs, tree t)
/* Lookup NAME in TABLE. If NAME is not found, create a new entry in
TABLE for NAME with NEXT_INDEX and increment NEXT_INDEX. Then
print the index to OBS. True is returned if NAME was added to the
- table. The resulting index is store in THIS_INDEX.
+ table. The resulting index is stored in THIS_INDEX.
If OBS is NULL, the only action is to add NAME to the table. */
bool
-lto_output_decl_index (struct lto_output_stream * obs, htab_t table,
+lto_output_decl_index (struct lto_output_stream *obs, htab_t table,
unsigned int *next_index, tree name,
unsigned int *this_index)
{
diff --git a/gcc/lto-tags.h b/gcc/lto-tags.h
index 417d6052a57..e4809819464 100644
--- a/gcc/lto-tags.h
+++ b/gcc/lto-tags.h
@@ -45,7 +45,7 @@
5) type_decls
6) types.
7) Names for the labels that have names
- 8) The ssa names.
+ 8) The SSA names.
9) The control flow graph.
10-11)Gimple for local decls.
12) Gimple for the function.
@@ -65,23 +65,31 @@
struct lto_function_header
{
struct lto_header lto_header; /* The header for all types of sections. */
- int32_t num_local_decls; /* Number of local VAR_DECLS and PARM_DECLS. */
+ int32_t num_local_decls; /* Number of local VAR_DECLS and
+ PARM_DECLS. */
int32_t num_named_labels; /* Number of labels with names. */
int32_t num_unnamed_labels; /* Number of labels without names. */
int32_t compressed_size; /* Size compressed or 0 if not compressed. */
int32_t named_label_size; /* Size of names for named labels. */
int32_t ssa_names_size; /* Size of the SSA_NAMES table. */
int32_t cfg_size; /* Size of the cfg. */
- int32_t local_decls_index_size; /* Size of local parm and var decl index region. */
+ int32_t local_decls_index_size; /* Size of local parm and var decl index
+ region. */
int32_t local_decls_size; /* Size of local parm and var decl region. */
int32_t main_size; /* Size of main gimple body of function. */
int32_t string_size; /* Size of the string table. */
- int32_t debug_decl_index_size; /* Size of local decl index debugging information. */
- int32_t debug_decl_size; /* Size of local decl debugging information. */
- int32_t debug_label_size; /* Size of label stream debugging information. */
- int32_t debug_ssa_names_size; /* Size of ssa_names stream debugging information. */
- int32_t debug_cfg_size; /* Size of cfg stream debugging information. */
- int32_t debug_main_size; /* Size of main stream debugging information. */
+ int32_t debug_decl_index_size; /* Size of local decl index debugging
+ information. */
+ int32_t debug_decl_size; /* Size of local decl debugging
+ information. */
+ int32_t debug_label_size; /* Size of label stream debugging
+ information. */
+ int32_t debug_ssa_names_size; /* Size of ssa_names stream debugging
+ information. */
+ int32_t debug_cfg_size; /* Size of cfg stream debugging
+ information. */
+ int32_t debug_main_size; /* Size of main stream debugging
+ information. */
};
/* 2-6) THE GLOBAL DECLS AND TYPES.