Sync libiberty with upstream GCC.
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 25 Jun 2017 09:39:34 +0000 (11:39 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 25 Jun 2017 09:39:34 +0000 (11:39 +0200)
commitd7e2ebe7e73105766a854f4f0e3a5c509fd0e82a
tree470a376c65aae67df2a4af77d0f013b40ffd8bb6
parent2d3392bd42e16b5c8894c357f250dbde245e96fe
Sync libiberty with upstream GCC.

libiberty/ChangeLog:

* d-demangle.c (dlang_identifier): Prefix mangled init symbols
with `initializer for'.
* testsuite/demangle-expected: Update tests.

* d-demangle.c (dlang_call_convention_p): Move declaration
before dlang_type.
(dlang_type): Handle function types.
* testsuite/d-demangle-expected: Add tests.

* d-demangle.c (dlang_parse_real): Remove stack buffer, write
the demangled hexadecimal directly to string.
* testsuite/d-demangle-expected: Add tests.

* d-demangle.c (dlang_hexdigit): New function.
(ascii2hex): Remove function.
(dlang_parse_string): Update to call dlang_hexdigit.
* testsuite/d-demangle-expected: Add tests.

* d-demangle.c (strtol): Remove declaration.
Updated all callers to use dlang_number.
(dlang_number): New function.
(dlang_value): Moved check for ISDIGIT into dlang_parse_integer.
* testsuite/d-demangle-expected: Add tests.

* d-demangle.c (dlang_parse_symbol): Remove function.
(dlang_parse_qualified): New function.
(dlang_parse_mangle): New function.
(dlang_type): Update to call dlang_parse_qualified.
(dlang_identifier): Update to call either dlang_parse_qualified or
dlang_parse_mangle.
(dlang_type_modifier_p): Remove function.
(dlang_call_convention_p): Don't allow type modifiers in mangle.
(dlang_template_args): Update to call dlang_identifier.
(dlang_demangle): Update to call dlang_parse_mangle.
* testsuite/d-demangle-expected: Add tests.

* d-demangle.c (dlang_value): Add comment explaining why cases for
digits are required.
* testsuite/d-demangle-expected: Update integer value tests.

* d-demangle.c (dlang_parse_symbol): Skip over anonymous symbols.
* testsuite/d-demangle-expected: Add tests.

* d-demangle.c (dlang_identifier): Handle template constraint symbols.
(dlang_parse_template): Only advance if template symbol prefix is
followed by a digit.
* testsuite/d-demangle-expected: Add tests.

* d-demangle.c (dlang_attributes): Handle scope attributes.
* testsuite/d-demangle-expected: Add tests.
libiberty/ChangeLog
libiberty/d-demangle.c
libiberty/testsuite/d-demangle-expected