summaryrefslogtreecommitdiff
path: root/plugins/itanium/abi.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/itanium/abi.c')
-rw-r--r--plugins/itanium/abi.c57
1 files changed, 55 insertions, 2 deletions
diff --git a/plugins/itanium/abi.c b/plugins/itanium/abi.c
index 300bf59..0304938 100644
--- a/plugins/itanium/abi.c
+++ b/plugins/itanium/abi.c
@@ -1818,6 +1818,7 @@ static itanium_component *itd_type(GItaniumDemangling *context)
* ::= C <type> # complex pair (C 2000)
* ::= G <type> # imaginary (C 2000)
* ::= U <source-name> <type> # vendor extended type qualifier
+ * ::= Dp <type> # pack expansion (C++0x)
*
*/
@@ -1946,6 +1947,17 @@ static itanium_component *itd_type(GItaniumDemangling *context)
handled = true;
break;
+ case 'D':
+ if (peek_input_buffer_next_char(ibuf) == 'p')
+ {
+ advance_input_buffer(ibuf, 2);
+
+ result = itd_type(context);
+ handled = true;
+
+ }
+ break;
+
case 'T':
/**
@@ -2832,7 +2844,7 @@ static itanium_component *itd_template_args(GItaniumDemangling *context)
arg = itd_template_arg(context);
if (arg == NULL) return NULL;
- result = itd_append_right_to_binary(ICT_TYPES_LIST, NULL, arg);
+ result = itd_merge_list_right_to_binary(ICT_TYPES_LIST, NULL, arg);
while (1)
{
@@ -2845,7 +2857,7 @@ static itanium_component *itd_template_args(GItaniumDemangling *context)
break;
}
- result = itd_append_right_to_binary(ICT_TYPES_LIST, result, arg);
+ result = itd_merge_list_right_to_binary(ICT_TYPES_LIST, result, arg);
}
@@ -2881,6 +2893,7 @@ static itanium_component *itd_template_arg(GItaniumDemangling *context)
itanium_component *result; /* Construction à retourner */
input_buffer *ibuf; /* Tampon de texte manipulé */
char peek; /* Prochain caractère lu */
+ itanium_component *packed; /* Argument compressé */
/**
* La règle traitée ici est la suivante :
@@ -2888,6 +2901,7 @@ static itanium_component *itd_template_arg(GItaniumDemangling *context)
* <template-arg> ::= <type> # type or template
* ::= X <expression> E # expression
* ::= <expr-primary> # simple expressions
+ * ::= J <template-arg>* E # argument pack
*
*/
@@ -2912,9 +2926,48 @@ static itanium_component *itd_template_arg(GItaniumDemangling *context)
else if (peek == 'L')
result = itd_expr_primary(context);
+ else if (peek == 'J')
+ {
+ advance_input_buffer(ibuf, 1);
+
+ result = NULL;
+
+ while (peek_input_buffer_char(ibuf) != 'E')
+ {
+ packed = itd_template_arg(context);
+
+ if (packed == NULL)
+ {
+ if (result != NULL)
+ {
+ itd_unref_comp(result);
+ result = NULL;
+ }
+
+ goto packed_failed;
+
+ }
+
+ result = itd_merge_list_right_to_binary(ICT_TYPES_LIST, result, packed);
+
+ }
+
+ if (result == NULL)
+ result = itd_make_with_type(ICT_PACKED_EMPTY);
+
+ if (!check_input_buffer_char(ibuf, 'E'))
+ {
+ itd_unref_comp(result);
+ result = NULL;
+ }
+
+ }
+
else
result = itd_type(context);
+ packed_failed:
+
return result;
}