From: Keith Seitz Date: Thu, 2 Feb 2017 20:55:24 +0000 (-0800) Subject: Correct some formatting boo-boos. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4360e65c3331fc09a6fd293b642b362835c84872;p=thirdparty%2Fbinutils-gdb.git Correct some formatting boo-boos. --- diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c index 2a9e91367c3..61d672515d7 100644 --- a/gdb/compile/compile-cplus-symbols.c +++ b/gdb/compile/compile-cplus-symbols.c @@ -540,9 +540,9 @@ gcc_cplus_convert_symbol (void *datum, if (!found) { - struct block_symbol sym; + struct block_symbol sym + = lookup_symbol (identifier, instance->block (), VAR_DOMAIN, NULL); - sym = lookup_symbol (identifier, instance->block (), VAR_DOMAIN, NULL); if (sym.symbol != NULL) { convert_symbol_sym (instance, identifier, sym, VAR_DOMAIN); @@ -552,9 +552,10 @@ gcc_cplus_convert_symbol (void *datum, if (1) { - struct block_symbol sym; + struct block_symbol sym + = lookup_symbol (identifier, instance->block (), STRUCT_DOMAIN, + NULL); - sym = lookup_symbol (identifier, instance->block (), STRUCT_DOMAIN, NULL); if (sym.symbol != NULL) { convert_symbol_sym (instance, identifier, sym, STRUCT_DOMAIN); diff --git a/gdb/compile/compile-cplus-templates.c b/gdb/compile/compile-cplus-templates.c index 57658644a0c..52057750cae 100644 --- a/gdb/compile/compile-cplus-templates.c +++ b/gdb/compile/compile-cplus-templates.c @@ -796,7 +796,8 @@ define_template_parameters_generic } instance->build_value_template_parameter (abstract_type, id, - default_value, filename, line); + default_value, + filename, line); } break; diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 7381e938262..22088b17bc0 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -1193,14 +1193,14 @@ ccp_convert_struct_or_union_methods (compile_cplus_instance *instance, = ccp_convert_method (instance, type, TYPE_FN_FIELD_TYPE (methods, j)); - instance->build_decl("pure virtual method", name, - (sym_kind - | get_method_access_flag (type, i, j) - | GCC_CP_FLAG_VIRTUAL_FUNCTION - | GCC_CP_FLAG_PURE_VIRTUAL_FUNCTION), - method_type, NULL, 0, - NULL /* FIXME: filename */, - 0 /* FIXME: line number */); + instance->build_decl ("pure virtual method", name, + (sym_kind + | get_method_access_flag (type, i, j) + | GCC_CP_FLAG_VIRTUAL_FUNCTION + | GCC_CP_FLAG_PURE_VIRTUAL_FUNCTION), + method_type, NULL, 0, + NULL /* FIXME: filename */, + 0 /* FIXME: line number */); do_cleanups (back_to); continue; } @@ -1230,7 +1230,8 @@ ccp_convert_struct_or_union_methods (compile_cplus_instance *instance, struct template_symbol *tsymbol = (struct template_symbol *) sym.symbol; - instance->build_function_template_specialization (tsymbol, address, + instance->build_function_template_specialization (tsymbol, + address, filename, line); do_cleanups (back_to); continue; @@ -1334,7 +1335,10 @@ ccp_convert_struct_or_union (compile_cplus_instance *instance, it go once we separate declaration from definition (see below). -lxo */ if (TYPE_N_TEMPLATE_ARGUMENTS (type)) - resuld = instance->build_class_template_specialization (type, filename, line); + { + resuld = instance->build_class_template_specialization (type, + filename, line); + } else if (TYPE_CODE (type) == TYPE_CODE_STRUCT) { const char *what = TYPE_DECLARED_CLASS (type) ? "struct" : "class"; @@ -1395,8 +1399,7 @@ ccp_convert_struct_or_union (compile_cplus_instance *instance, { gdb_assert (TYPE_CODE (type) == TYPE_CODE_UNION); result - = instance->start_class_type (name, resuld, NULL, - filename, line); + = instance->start_class_type (name, resuld, NULL, filename, line); } instance->insert_type (type, result); @@ -1858,8 +1861,8 @@ compile_cplus_instance::build_function_template_specialization make_cleanup (xfree, targs.elements); enumerate_template_arguments (&targs, defn, concrete->template_arguments); - DECLARE_FORWARD (build_function_template_specialization, defn->decl (), &targs, - address, filename, line_number); + DECLARE_FORWARD (build_function_template_specialization, defn->decl (), + &targs, address, filename, line_number); gcc_decl result = forward ("%s", SYMBOL_NATURAL_NAME (&concrete->base)); do_cleanups (back_to); @@ -1869,9 +1872,8 @@ compile_cplus_instance::build_function_template_specialization /* See description in gcc-cp-fe.def. */ gcc_decl -compile_cplus_instance::build_class_template_specialization (struct type *concrete, - const char *filename, - unsigned int line_number) +compile_cplus_instance::build_class_template_specialization + (struct type *concrete, const char *filename, unsigned int line_number) { class_template_defn *defn = find_class_template_defn (concrete); @@ -2007,9 +2009,11 @@ compile_cplus_instance::build_array_type (gcc_type element_type, /* See description in gcc-cp-fe.def. */ gcc_decl -compile_cplus_instance::build_field (const char *field_name, gcc_type field_type, +compile_cplus_instance::build_field (const char *field_name, + gcc_type field_type, enum gcc_cp_symbol_kind field_flags, - unsigned long bitsize, unsigned long bitpos) + unsigned long bitsize, + unsigned long bitpos) { DECLARE_FORWARD (build_field, field_name, field_type, field_flags, bitsize, bitpos); @@ -2058,7 +2062,8 @@ compile_cplus_instance::finish_class_type (const char *name, /* See description in gcc-cp-fe.def. */ gcc_type -compile_cplus_instance::get_int_type (bool is_unsigned, unsigned long size_in_bytes, +compile_cplus_instance::get_int_type (bool is_unsigned, + unsigned long size_in_bytes, const char *builtin_name) { DECLARE_FORWARD (get_int_type, is_unsigned, size_in_bytes, builtin_name); @@ -2191,7 +2196,8 @@ compile_cplus_instance::build_literal_expr (gcc_type type, unsigned long value) /* See description in gcc-cp-fe.def. */ gcc_type -compile_cplus_instance::build_type_template_parameter (const char *id, bool pack_p, +compile_cplus_instance::build_type_template_parameter (const char *id, + bool pack_p, gcc_type default_type, const char *filename, unsigned int line_number) @@ -2206,10 +2212,9 @@ compile_cplus_instance::build_type_template_parameter (const char *id, bool pack /* See description in gcc-cp-fe.def. */ gcc_decl -compile_cplus_instance::build_value_template_parameter (gcc_type type, const char *id, - gcc_expr default_value, - const char *filename, - unsigned int line_number) +compile_cplus_instance::build_value_template_parameter + (gcc_type type, const char *id, gcc_expr default_value, + const char *filename, unsigned int line_number) { DECLARE_FORWARD (build_value_template_parameter, type, id, default_value, filename, line_number); diff --git a/gdb/compile/compile-cplus.h b/gdb/compile/compile-cplus.h index 5d7a7b67777..15b4ca17d18 100644 --- a/gdb/compile/compile-cplus.h +++ b/gdb/compile/compile-cplus.h @@ -230,7 +230,8 @@ namespace compile /* NAME for debugging */ bool finish_class_type (const char *name, unsigned long size_in_bytes); - gcc_type get_float_type (unsigned long size_in_bytes, const char *builtin_name); + gcc_type get_float_type (unsigned long size_in_bytes, + const char *builtin_name); gcc_type get_int_type (bool is_unsigned, unsigned long size_in_bytes, const char *builtin_name); @@ -267,10 +268,9 @@ namespace compile const char *filename, unsigned int line_number); - gcc_decl build_function_template_specialization (struct template_symbol *concrete, - gcc_address address, - const char *filename, - unsigned int line_number); + gcc_decl build_function_template_specialization + (struct template_symbol *concrete, gcc_address address, + const char *filename, unsigned int line_number); /* NAME only for debugging */ gcc_type start_class_type (const char *name, gcc_decl typedecl,