aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 34f19efc42e..81ac1daac98 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -1292,18 +1292,16 @@ write_source_name (tree identifier)
}
/* Write a user-defined literal operator.
+ ::= li <source-name> # "" <source-name>
IDENTIFIER is an LITERAL_IDENTIFIER_NODE. */
static void
write_literal_operator_name (tree identifier)
{
const char* suffix = UDLIT_OP_SUFFIX (identifier);
- char* buffer = XNEWVEC (char, strlen (UDLIT_OP_MANGLED_PREFIX)
- + strlen (suffix) + 10);
- sprintf (buffer, UDLIT_OP_MANGLED_FORMAT, suffix);
-
- write_unsigned_number (strlen (buffer));
- write_identifier (buffer);
+ write_identifier (UDLIT_OP_MANGLED_PREFIX);
+ write_unsigned_number (strlen (suffix));
+ write_identifier (suffix);
}
/* Encode 0 as _, and 1+ as n-1_. */
@@ -1935,6 +1933,13 @@ write_type (tree type)
break;
case TEMPLATE_TYPE_PARM:
+ if (is_auto (type))
+ {
+ write_identifier ("Da");
+ ++is_builtin_type;
+ break;
+ }
+ /* else fall through. */
case TEMPLATE_PARM_INDEX:
write_template_param (type);
break;