Commit Graph

119 Commits

Author SHA1 Message Date
Gary Benson fd259167db libiberty: sync with gcc
libiberty/ 2014-01-06 Gary Benson <gbenson@redhat.com>

	* cp-demangle.c (struct d_print_info): New fields
	next_saved_scope, copy_templates, next_copy_template and
	num_copy_templates.
	(d_count_templates): New function.
	(d_print_init): New parameter "dc".
	Estimate numbers of templates and scopes required.
	(d_print_free): Removed function.
	(cplus_demangle_print_callback): Allocate stack for
	templates and scopes.  Removed call to d_print_free.
	(d_copy_templates): Removed function.
	(d_save_scope): New function.
	(d_get_saved_scope): Likewise.
	(d_print_comp): Replace state saving/restoring code with
	calls to d_save_scope and d_get_saved_scope.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206362 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-06 13:44:24 -05:00
Bill Maddox eafbc3bf7b libiberty: sync with gcc
PR c++/41090
	Add -fdeclone-ctor-dtor.
include/
	* demangle.h (enum gnu_v3_ctor_kinds):
	Added literal gnu_v3_unified_ctor.
	(enum gnu_v3_ctor_kinds):
	Added literal gnu_v3_unified_dtor.
libiberty/
	* cp-demangle.c (cplus_demangle_fill_ctor,cplus_demangle_fill_dtor):
	Handle unified ctor/dtor.
	(d_ctor_dtor_name): Handle unified ctor/dtor.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206182 138bc75d-0d04-0410-961f-82ee72b054a4
2014-01-06 13:44:21 -05:00
ccoutant 492e19d098 Fix demangler to handle conversion operators correctly.
libiberty/
	PR other/59195
	* cp-demangle.c (struct d_info_checkpoint): New struct.
	(struct d_print_info): Add current_template field.
	(d_operator_name): Set flag when processing a conversion
	operator.
	(cplus_demangle_type): When processing <template-args> for
	a conversion operator, backtrack if necessary.
	(d_expression_1): Renamed from d_expression.
	(d_expression): New wrapper around d_expression_1.
	(d_checkpoint): New function.
	(d_backtrack): New function.
	(d_print_init): Initialize current_template.
	(d_print_comp): Set current_template.
	(d_print_cast): Put current_template in scope for
	printing conversion operator name.
	(cplus_demangle_init_info): Initialize is_expression and
	is_conversion.
	* cp-demangle.h (struct d_info): Add is_expression and
	is_conversion fields.
	* testsuite/demangle-expected: New test cases.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205292 138bc75d-0d04-0410-961f-82ee72b054a4
2013-11-26 09:35:29 -07:00
uros 8467a2fd55 * cp-demangle.c (d_copy_templates): Cast result of malloc to (struct d_print_template *). (d_print_comp): Cast result of realloc to (struct d_saved scope *).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204713 138bc75d-0d04-0410-961f-82ee72b054a4
2013-11-15 10:17:57 -07:00
gary 9548bbede5 libiberty/ 2013-10-25 Gary Benson <gbenson@redhat.com>
* cp-demangle.c (struct d_saved_scope): New structure.
	(struct d_print_info): New fields saved_scopes and
	num_saved_scopes.
	(d_print_init): Initialize the above.
	(d_print_free): New function.
	(cplus_demangle_print_callback): Call the above.
	(d_copy_templates): New function.
	(d_print_comp): New variables saved_templates and
	need_template_restore.
	[DEMANGLE_COMPONENT_REFERENCE,
	DEMANGLE_COMPONENT_RVALUE_REFERENCE]: Capture scope the first
	time the component is traversed, and use the captured scope for
	subsequent traversals.
	* testsuite/demangle-expected: Add regression test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204068 138bc75d-0d04-0410-961f-82ee72b054a4
2013-11-08 11:11:41 -07:00
DJ Delorie 26505cc0c4 merge from gcc 2013-10-16 00:29:48 +00:00
DJ Delorie 53f94b92ee merge from gcc 2013-09-10 19:01:22 +00:00
DJ Delorie eabdca0f8d merge from gcc 2013-09-10 16:05:02 +00:00
DJ Delorie dcd7e9d6a5 merge from gcc 2013-04-04 01:03:01 +00:00
DJ Delorie 3a4d23392f merge from gcc 2013-04-03 18:21:49 +00:00
DJ Delorie a9c3ecea79 merge from gcc 2013-02-15 02:48:33 +00:00
DJ Delorie 1f3de044c6 merge from gcc 2012-11-11 22:37:30 +00:00
DJ Delorie 995b61fe5b merge from gcc 2012-10-10 03:11:33 +00:00
DJ Delorie 7c32896367 merge from gcc 2012-07-18 20:09:08 +00:00
DJ Delorie 67bf71fede merge from gcc 2012-05-22 18:05:41 +00:00
DJ Delorie 24e829d007 merge from gcc 2012-04-02 18:50:29 +00:00
DJ Delorie 4e3aa40890 merge from gcc 2012-03-08 00:01:31 +00:00
DJ Delorie fbfd63c0a6 merge from gcc 2012-01-10 18:15:34 +00:00
DJ Delorie eb7b5ddb8b merge from gcc 2012-01-06 22:04:43 +00:00
DJ Delorie 956a8f8beb merge from gcc 2011-11-08 16:01:58 +00:00
DJ Delorie abc6552b26 merge from gcc 2011-11-04 14:32:13 +00:00
DJ Delorie f9fb0b2d9f merge from gcc 2011-10-10 21:02:57 +00:00
DJ Delorie 7955ede528 merge from gcc 2011-09-23 22:21:36 +00:00
DJ Delorie 6b6bd65aa5 merge from gcc 2011-08-06 18:40:27 +00:00
DJ Delorie 04aed65246 merge from gcc 2011-07-26 16:04:38 +00:00
DJ Delorie f2917a30d0 merge from gcc 2011-07-05 15:40:17 +00:00
Jan Kratochvil 02e7efbffb merge from gcc
libiberty/
	PR debug/49408
	* cp-demangle.c (d_print_comp): Suppress argument list for function
	references by the '&' unary operator.  Keep also already processed
	variant without the argument list.  Suppress argument list types for
	function call used in an expression.
	* testsuite/demangle-expected: Fix excessive argument list types in
	`test for typed function in decltype'.  New testcase for no argument
	list types printed.  3 new testcases for function references by the
	'&' unary operator..
2011-07-01 17:30:48 +00:00
DJ Delorie b24539b3f7 merge from gcc 2011-06-22 19:13:44 +00:00
DJ Delorie ddee5e46a4 merge from gcc 2011-06-13 23:01:48 +00:00
H.J. Lu a0692e366a Properly demangle a global constructor symbol.
2010-11-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR other/42670
	PR binutils/11137
	* cp-demangle.c (d_make_demangle_mangled_name): New.
	(d_demangle_callback): Use it on DCT_GLOBAL_XTORS.

	* testsuite/demangle-expected: Updated.
2010-11-16 17:58:26 +00:00
DJ Delorie 361c311554 merge from gcc 2010-11-13 02:20:31 +00:00
Tom Tromey 57cf60a5bb 2010-09-10 James Lyon <jameslyon0@googlemail.com>
http://sourceware.org/bugzilla/show_bug.cgi?id=11572
	* cp-demangle.c (d_find_pack): Add case for
	DEMANGLE_COMPONENT_LAMBDA.
	* testsuite/demangle-expected: Add regression test.
2010-09-10 22:42:05 +00:00
Jakub Jelinek 3baae9d67e PR other/43838
* cp-demangle.c (struct d_print_info): Add flush_count field.
	(d_print_init): Initialize it to 0.
	(d_print_flush): Increment it.
	(d_print_comp): If needed flush before appending ", ".  Only
	decrement dpi->len if no flushes happened during the recursive
	call.
	* testsuite/demangle-expected: Add a test for this.
2010-06-10 15:42:01 +00:00
DJ Delorie cf383746fa merge from gcc 2010-05-06 21:40:04 +00:00
DJ Delorie f9b58c5ba6 merge from gcc 2010-03-22 21:39:44 +00:00
DJ Delorie cbc4312826 merge from gcc 2010-02-03 23:28:01 +00:00
DJ Delorie 9ac9c2b6b0 merge from gcc 2010-01-21 02:05:11 +00:00
H.J. Lu ffe7cfdf31 Return dgs.alc on success
2010-01-09  Ian Lance Taylor  <iant@google.com>

	PR other/42230
	* cp-demangle.c (d_demangle): Return dgs.alc on success.
2010-01-10 01:19:02 +00:00
DJ Delorie 664aa91f58 merge from gcc 2009-10-02 18:23:01 +00:00
DJ Delorie d503175434 merge from gcc 2009-07-17 20:20:45 +00:00
DJ Delorie 4e55d6c3ee merge from gcc 2009-05-19 03:02:30 +00:00
DJ Delorie e2e1864d3b merge from gcc 2009-03-23 22:05:12 +00:00
DJ Delorie c743cf5d81 merge from gcc 2009-03-18 00:07:49 +00:00
DJ Delorie 60cf58f5cf merge from gcc 2009-01-07 18:52:57 +00:00
DJ Delorie 4e59450ef0 merge from gcc 2008-12-18 15:56:12 +00:00
DJ Delorie d2825c1a4c merge from gcc 2008-12-10 23:28:19 +00:00
DJ Delorie 1c08f2c880 merge from gcc 2008-10-07 01:28:01 +00:00
DJ Delorie ba8cb4bac5 merge from gcc 2008-09-09 18:21:49 +00:00
DJ Delorie dddc49b73b merge from gcc 2008-03-31 18:11:50 +00:00
David Daney 830ef6349c include/
2008-01-26  David Daney  <ddaney@avtrex.com>

	* demangle.h (demangle_component_type):  Add
	DEMANGLE_COMPONENT_JAVA_RESOURCE,
	DEMANGLE_COMPONENT_COMPOUND_NAME, and
	DEMANGLE_COMPONENT_CHARACTER as new enum values.
	(demangle_component): Add struct s_character to union u.

libiberty/
2008-01-26  David Daney  <ddaney@avtrex.com>

	* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_JAVA_RESOURCE,
	DEMANGLE_COMPONENT_COMPOUND_NAME, and
	DEMANGLE_COMPONENT_CHARACTER cases.
	(d_make_comp): Handle DEMANGLE_COMPONENT_COMPOUND_NAME and
	DEMANGLE_COMPONENT_JAVA_RESOURCE cases.
	(d_make_character): New function.
	(d_java_resource): Same.
	(d_special_name): Handle "Gr" case.
	(d_print_comp): Handle DEMANGLE_COMPONENT_JAVA_RESOURCE,
	DEMANGLE_COMPONENT_COMPOUND_NAME, and
	DEMANGLE_COMPONENT_CHARACTER cases.
	* testsuite/demangle-expected: Add test for java resource name
	mangling.
2008-01-27 06:25:45 +00:00