This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Export bits of the demangler's internal interface
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: ian at airs dot com
- Date: Tue, 30 Dec 2003 16:34:16 -0500
- Subject: Export bits of the demangler's internal interface
Hi Ian,
What do you think of the below? These are the bits of the demangler that
I'm currently re-using in GDB. It's not a pretty interface, but I'm more
interested in using it than designing a proper interface for it; if you'd
rather do this from the other side first then I can put some more thought
into it. Right now it's easy enough to update all clients when you make an
incompatible change.
The current client is a string -> d_comp convertor. Forthcoming shortly
will be a GDB 'struct type' -> d_comp translator, for at least some cases.
I'm trying to decide whether to handle both C and C++; if I also want to
handle C I'll need to add some things to the demangler that I think I'd
rather not. Unnamed structs declared in parameter lists for instance.
Also, how concerned are you about changing the demangler output? Is that a
major compatibility issue? I'd like to print char constants using
single-quoted literals, instead of numerically.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-12-30 Daniel Jacobowitz <drow@mvista.com>
* cp-demangle.h: New file.
2003-12-30 Daniel Jacobowitz <drow@mvista.com>
* cp-demangle.c: Include cp-demangle.h. Export some public
functions and variables.
Index: include/cp-demangle.h
===================================================================
RCS file: include/cp-demangle.h
diff -N include/cp-demangle.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ include/cp-demangle.h 30 Dec 2003 21:27:11 -0000
@@ -0,0 +1,328 @@
+/* Internal interfaces to the demangler for g++ V3 ABI.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor <ian@wasabisystems.com>.
+
+ This file is part of the libiberty library, which is part of GCC.
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ In addition to the permissions in the GNU General Public License, the
+ Free Software Foundation gives you unlimited permission to link the
+ compiled version of this file into combinations with other programs,
+ and to distribute those combinations without any restriction coming
+ from the use of this file. (The General Public License restrictions
+ do apply in other respects; for example, they cover modification of
+ the file, and distribution when not linked into a combined
+ executable.)
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+/* This header exports some internal interfaces used by the g++ V3 demangler.
+ They are only exported for the use of GDB, and are subject to change. */
+
+#include "ansidecl.h"
+
+/* Information we keep for operators. */
+
+struct d_operator_info
+{
+ /* Mangled name. */
+ const char *code;
+ /* Real name. */
+ const char *name;
+ /* Length of real name. */
+ int len;
+ /* Number of arguments. */
+ int args;
+};
+
+extern const struct d_operator_info d_operators[];
+
+/* How to print the value of a builtin type. */
+
+enum d_builtin_type_print
+{
+ /* Print as (type)val. */
+ D_PRINT_DEFAULT,
+ /* Print as integer. */
+ D_PRINT_INT,
+ /* Print as long, with trailing `l'. */
+ D_PRINT_LONG,
+ /* Print as bool. */
+ D_PRINT_BOOL,
+ /* Print in usual way, but here to detect void. */
+ D_PRINT_VOID
+};
+
+/* Information we keep for a builtin type. */
+
+struct d_builtin_type_info
+{
+ /* Type name. */
+ const char *name;
+ /* Length of type name. */
+ int len;
+ /* Type name when using Java. */
+ const char *java_name;
+ /* Length of java name. */
+ int java_len;
+ /* How to print a value of this type. */
+ enum d_builtin_type_print print;
+};
+
+extern const struct d_builtin_type_info d_builtin_types[];
+
+/* Component types found in mangled names. */
+
+enum d_comp_type
+{
+ /* A name. */
+ D_COMP_NAME,
+ /* A qualified name. */
+ D_COMP_QUAL_NAME,
+ /* A local name. */
+ D_COMP_LOCAL_NAME,
+ /* A typed name. */
+ D_COMP_TYPED_NAME,
+ /* A template. */
+ D_COMP_TEMPLATE,
+ /* A template parameter. */
+ D_COMP_TEMPLATE_PARAM,
+ /* A constructor. */
+ D_COMP_CTOR,
+ /* A destructor. */
+ D_COMP_DTOR,
+ /* A vtable. */
+ D_COMP_VTABLE,
+ /* A VTT structure. */
+ D_COMP_VTT,
+ /* A construction vtable. */
+ D_COMP_CONSTRUCTION_VTABLE,
+ /* A typeinfo structure. */
+ D_COMP_TYPEINFO,
+ /* A typeinfo name. */
+ D_COMP_TYPEINFO_NAME,
+ /* A typeinfo function. */
+ D_COMP_TYPEINFO_FN,
+ /* A thunk. */
+ D_COMP_THUNK,
+ /* A virtual thunk. */
+ D_COMP_VIRTUAL_THUNK,
+ /* A covariant thunk. */
+ D_COMP_COVARIANT_THUNK,
+ /* A Java class. */
+ D_COMP_JAVA_CLASS,
+ /* A guard variable. */
+ D_COMP_GUARD,
+ /* A reference temporary. */
+ D_COMP_REFTEMP,
+ /* A standard substitution. */
+ D_COMP_SUB_STD,
+ /* The restrict qualifier. */
+ D_COMP_RESTRICT,
+ /* The volatile qualifier. */
+ D_COMP_VOLATILE,
+ /* The const qualifier. */
+ D_COMP_CONST,
+ /* The restrict qualifier modifying a member function. */
+ D_COMP_RESTRICT_THIS,
+ /* The volatile qualifier modifying a member function. */
+ D_COMP_VOLATILE_THIS,
+ /* The const qualifier modifying a member function. */
+ D_COMP_CONST_THIS,
+ /* A vendor qualifier. */
+ D_COMP_VENDOR_TYPE_QUAL,
+ /* A pointer. */
+ D_COMP_POINTER,
+ /* A reference. */
+ D_COMP_REFERENCE,
+ /* A complex type. */
+ D_COMP_COMPLEX,
+ /* An imaginary type. */
+ D_COMP_IMAGINARY,
+ /* A builtin type. */
+ D_COMP_BUILTIN_TYPE,
+ /* A vendor's builtin type. */
+ D_COMP_VENDOR_TYPE,
+ /* A function type. */
+ D_COMP_FUNCTION_TYPE,
+ /* An array type. */
+ D_COMP_ARRAY_TYPE,
+ /* A pointer to member type. */
+ D_COMP_PTRMEM_TYPE,
+ /* An argument list. */
+ D_COMP_ARGLIST,
+ /* A template argument list. */
+ D_COMP_TEMPLATE_ARGLIST,
+ /* An operator. */
+ D_COMP_OPERATOR,
+ /* An extended operator. */
+ D_COMP_EXTENDED_OPERATOR,
+ /* A typecast. */
+ D_COMP_CAST,
+ /* A unary expression. */
+ D_COMP_UNARY,
+ /* A binary expression. */
+ D_COMP_BINARY,
+ /* Arguments to a binary expression. */
+ D_COMP_BINARY_ARGS,
+ /* A trinary expression. */
+ D_COMP_TRINARY,
+ /* Arguments to a trinary expression. */
+ D_COMP_TRINARY_ARG1,
+ D_COMP_TRINARY_ARG2,
+ /* A literal. */
+ D_COMP_LITERAL,
+ /* A negative literal. */
+ D_COMP_LITERAL_NEG
+};
+
+/* A component of the mangled name. */
+
+struct d_comp
+{
+ /* The type of this component. */
+ enum d_comp_type type;
+ union
+ {
+ /* For D_COMP_NAME. */
+ struct
+ {
+ /* A pointer to the name (not NULL terminated) and it's
+ length. */
+ const char *s;
+ int len;
+ } s_name;
+
+ /* For D_COMP_OPERATOR. */
+ struct
+ {
+ /* Operator. */
+ const struct d_operator_info *op;
+ } s_operator;
+
+ /* For D_COMP_EXTENDED_OPERATOR. */
+ struct
+ {
+ /* Number of arguments. */
+ int args;
+ /* Name. */
+ struct d_comp *name;
+ } s_extended_operator;
+
+ /* For D_COMP_CTOR. */
+ struct
+ {
+ enum gnu_v3_ctor_kinds kind;
+ struct d_comp *name;
+ } s_ctor;
+
+ /* For D_COMP_DTOR. */
+ struct
+ {
+ enum gnu_v3_dtor_kinds kind;
+ struct d_comp *name;
+ } s_dtor;
+
+ /* For D_COMP_BUILTIN_TYPE. */
+ struct
+ {
+ const struct d_builtin_type_info *type;
+ } s_builtin;
+
+ /* For D_COMP_SUB_STD. */
+ struct
+ {
+ const char* string;
+ int len;
+ } s_string;
+
+ /* For D_COMP_TEMPLATE_PARAM. */
+ struct
+ {
+ long number;
+ } s_number;
+
+ /* For other types. */
+ struct
+ {
+ struct d_comp *left;
+ struct d_comp *right;
+ } s_binary;
+
+ } u;
+};
+
+#define d_left(dc) ((dc)->u.s_binary.left)
+#define d_right(dc) ((dc)->u.s_binary.right)
+
+/* The information structure we pass around. */
+
+struct d_info
+{
+ /* The string we are demangling. */
+ const char *s;
+ /* The end of the string we are demangling. */
+ const char *send;
+ /* The options passed to the demangler. */
+ int options;
+ /* The next character in the string to consider. */
+ const char *n;
+ /* The array of components. */
+ struct d_comp *comps;
+ /* The index of the next available component. */
+ int next_comp;
+ /* The number of available component structures. */
+ int num_comps;
+ /* The array of substitutions. */
+ struct d_comp **subs;
+ /* The index of the next substitution. */
+ int next_sub;
+ /* The number of available entries in the subs array. */
+ int num_subs;
+ /* The number of substitutions which we actually made from the subs
+ array, plus the number of template parameter references we
+ saw. */
+ int did_subs;
+ /* The last name we saw, for constructors and destructors. */
+ struct d_comp *last_name;
+ /* A running total of the length of large expansions from the
+ mangled name to the demangled name, such as standard
+ substitutions and builtin types. */
+ int expansion;
+};
+
+extern struct d_comp *d_make_empty PARAMS ((struct d_info *,
+ enum d_comp_type));
+extern struct d_comp *d_make_comp PARAMS ((struct d_info *, enum d_comp_type,
+ struct d_comp *, struct d_comp *));
+extern struct d_comp *d_make_name PARAMS ((struct d_info *, const char *,
+ int));
+extern struct d_comp *d_make_builtin_type PARAMS ((struct d_info *,
+ const struct d_builtin_type_info *));
+extern struct d_comp *d_make_operator PARAMS ((struct d_info *,
+ const struct d_operator_info *));
+extern struct d_comp *d_make_extended_operator PARAMS ((struct d_info *,
+ int,
+ struct d_comp *));
+extern struct d_comp *d_make_ctor PARAMS ((struct d_info *,
+ enum gnu_v3_ctor_kinds,
+ struct d_comp *));
+extern struct d_comp *d_make_dtor PARAMS ((struct d_info *,
+ enum gnu_v3_dtor_kinds,
+ struct d_comp *));
+
+extern char *d_print PARAMS ((int, const struct d_comp *, int, size_t *));
+extern void d_init_info PARAMS ((const char *, int, size_t, struct d_info *));
+
Index: libiberty/cp-demangle.c
===================================================================
RCS file: /cvs/src/src/libiberty/cp-demangle.c,v
retrieving revision 1.27.4.3
diff -u -p -r1.27.4.3 cp-demangle.c
--- libiberty/cp-demangle.c 24 Dec 2003 22:08:39 -0000 1.27.4.3
+++ libiberty/cp-demangle.c 30 Dec 2003 21:27:12 -0000
@@ -82,6 +82,8 @@
#include "libiberty.h"
#include "demangle.h"
+#include "cp-demangle.h"
+
/* See if the compiler supports dynamic arrays. */
#ifdef __GNUC__
@@ -115,52 +117,6 @@
#define ANONYMOUS_NAMESPACE_PREFIX_LEN \
(sizeof (ANONYMOUS_NAMESPACE_PREFIX) - 1)
-/* Information we keep for operators. */
-
-struct d_operator_info
-{
- /* Mangled name. */
- const char *code;
- /* Real name. */
- const char *name;
- /* Length of real name. */
- int len;
- /* Number of arguments. */
- int args;
-};
-
-/* How to print the value of a builtin type. */
-
-enum d_builtin_type_print
-{
- /* Print as (type)val. */
- D_PRINT_DEFAULT,
- /* Print as integer. */
- D_PRINT_INT,
- /* Print as long, with trailing `l'. */
- D_PRINT_LONG,
- /* Print as bool. */
- D_PRINT_BOOL,
- /* Print in usual way, but here to detect void. */
- D_PRINT_VOID
-};
-
-/* Information we keep for a builtin type. */
-
-struct d_builtin_type_info
-{
- /* Type name. */
- const char *name;
- /* Length of type name. */
- int len;
- /* Type name when using Java. */
- const char *java_name;
- /* Length of java name. */
- int java_len;
- /* How to print a value of this type. */
- enum d_builtin_type_print print;
-};
-
/* Information we keep for the standard substitutions. */
struct d_standard_sub_info
@@ -184,226 +140,6 @@ struct d_standard_sub_info
int set_last_name_len;
};
-/* Component types found in mangled names. */
-
-enum d_comp_type
-{
- /* A name. */
- D_COMP_NAME,
- /* A qualified name. */
- D_COMP_QUAL_NAME,
- /* A local name. */
- D_COMP_LOCAL_NAME,
- /* A typed name. */
- D_COMP_TYPED_NAME,
- /* A template. */
- D_COMP_TEMPLATE,
- /* A template parameter. */
- D_COMP_TEMPLATE_PARAM,
- /* A constructor. */
- D_COMP_CTOR,
- /* A destructor. */
- D_COMP_DTOR,
- /* A vtable. */
- D_COMP_VTABLE,
- /* A VTT structure. */
- D_COMP_VTT,
- /* A construction vtable. */
- D_COMP_CONSTRUCTION_VTABLE,
- /* A typeinfo structure. */
- D_COMP_TYPEINFO,
- /* A typeinfo name. */
- D_COMP_TYPEINFO_NAME,
- /* A typeinfo function. */
- D_COMP_TYPEINFO_FN,
- /* A thunk. */
- D_COMP_THUNK,
- /* A virtual thunk. */
- D_COMP_VIRTUAL_THUNK,
- /* A covariant thunk. */
- D_COMP_COVARIANT_THUNK,
- /* A Java class. */
- D_COMP_JAVA_CLASS,
- /* A guard variable. */
- D_COMP_GUARD,
- /* A reference temporary. */
- D_COMP_REFTEMP,
- /* A standard substitution. */
- D_COMP_SUB_STD,
- /* The restrict qualifier. */
- D_COMP_RESTRICT,
- /* The volatile qualifier. */
- D_COMP_VOLATILE,
- /* The const qualifier. */
- D_COMP_CONST,
- /* The restrict qualifier modifying a member function. */
- D_COMP_RESTRICT_THIS,
- /* The volatile qualifier modifying a member function. */
- D_COMP_VOLATILE_THIS,
- /* The const qualifier modifying a member function. */
- D_COMP_CONST_THIS,
- /* A vendor qualifier. */
- D_COMP_VENDOR_TYPE_QUAL,
- /* A pointer. */
- D_COMP_POINTER,
- /* A reference. */
- D_COMP_REFERENCE,
- /* A complex type. */
- D_COMP_COMPLEX,
- /* An imaginary type. */
- D_COMP_IMAGINARY,
- /* A builtin type. */
- D_COMP_BUILTIN_TYPE,
- /* A vendor's builtin type. */
- D_COMP_VENDOR_TYPE,
- /* A function type. */
- D_COMP_FUNCTION_TYPE,
- /* An array type. */
- D_COMP_ARRAY_TYPE,
- /* A pointer to member type. */
- D_COMP_PTRMEM_TYPE,
- /* An argument list. */
- D_COMP_ARGLIST,
- /* A template argument list. */
- D_COMP_TEMPLATE_ARGLIST,
- /* An operator. */
- D_COMP_OPERATOR,
- /* An extended operator. */
- D_COMP_EXTENDED_OPERATOR,
- /* A typecast. */
- D_COMP_CAST,
- /* A unary expression. */
- D_COMP_UNARY,
- /* A binary expression. */
- D_COMP_BINARY,
- /* Arguments to a binary expression. */
- D_COMP_BINARY_ARGS,
- /* A trinary expression. */
- D_COMP_TRINARY,
- /* Arguments to a trinary expression. */
- D_COMP_TRINARY_ARG1,
- D_COMP_TRINARY_ARG2,
- /* A literal. */
- D_COMP_LITERAL,
- /* A negative literal. */
- D_COMP_LITERAL_NEG
-};
-
-/* A component of the mangled name. */
-
-struct d_comp
-{
- /* The type of this component. */
- enum d_comp_type type;
- union
- {
- /* For D_COMP_NAME. */
- struct
- {
- /* A pointer to the name (not NULL terminated) and it's
- length. */
- const char *s;
- int len;
- } s_name;
-
- /* For D_COMP_OPERATOR. */
- struct
- {
- /* Operator. */
- const struct d_operator_info *op;
- } s_operator;
-
- /* For D_COMP_EXTENDED_OPERATOR. */
- struct
- {
- /* Number of arguments. */
- int args;
- /* Name. */
- struct d_comp *name;
- } s_extended_operator;
-
- /* For D_COMP_CTOR. */
- struct
- {
- enum gnu_v3_ctor_kinds kind;
- struct d_comp *name;
- } s_ctor;
-
- /* For D_COMP_DTOR. */
- struct
- {
- enum gnu_v3_dtor_kinds kind;
- struct d_comp *name;
- } s_dtor;
-
- /* For D_COMP_BUILTIN_TYPE. */
- struct
- {
- const struct d_builtin_type_info *type;
- } s_builtin;
-
- /* For D_COMP_SUB_STD. */
- struct
- {
- const char* string;
- int len;
- } s_string;
-
- /* For D_COMP_TEMPLATE_PARAM. */
- struct
- {
- long number;
- } s_number;
-
- /* For other types. */
- struct
- {
- struct d_comp *left;
- struct d_comp *right;
- } s_binary;
-
- } u;
-};
-
-#define d_left(dc) ((dc)->u.s_binary.left)
-#define d_right(dc) ((dc)->u.s_binary.right)
-
-/* The information structure we pass around. */
-
-struct d_info
-{
- /* The string we are demangling. */
- const char *s;
- /* The end of the string we are demangling. */
- const char *send;
- /* The options passed to the demangler. */
- int options;
- /* The next character in the string to consider. */
- const char *n;
- /* The array of components. */
- struct d_comp *comps;
- /* The index of the next available component. */
- int next_comp;
- /* The number of available component structures. */
- int num_comps;
- /* The array of substitutions. */
- struct d_comp **subs;
- /* The index of the next substitution. */
- int next_sub;
- /* The number of available entries in the subs array. */
- int num_subs;
- /* The number of substitutions which we actually made from the subs
- array, plus the number of template parameter references we
- saw. */
- int did_subs;
- /* The last name we saw, for constructors and destructors. */
- struct d_comp *last_name;
- /* A running total of the length of large expansions from the
- mangled name to the demangled name, such as standard
- substitutions and builtin types. */
- int expansion;
-};
-
#define d_peek_char(di) (*((di)->n))
#define d_peek_next_char(di) ((di)->n[1])
#define d_advance(di, i) ((di)->n += (i))
@@ -490,25 +226,6 @@ struct d_print_info
#ifdef CP_DEMANGLE_DEBUG
static void d_dump PARAMS ((struct d_comp *, int));
#endif
-static struct d_comp *d_make_empty PARAMS ((struct d_info *,
- enum d_comp_type));
-static struct d_comp *d_make_comp PARAMS ((struct d_info *, enum d_comp_type,
- struct d_comp *, struct d_comp *));
-static struct d_comp *d_make_name PARAMS ((struct d_info *, const char *,
- int));
-static struct d_comp *d_make_builtin_type PARAMS ((struct d_info *,
- const struct d_builtin_type_info *));
-static struct d_comp *d_make_operator PARAMS ((struct d_info *,
- const struct d_operator_info *));
-static struct d_comp *d_make_extended_operator PARAMS ((struct d_info *,
- int,
- struct d_comp *));
-static struct d_comp *d_make_ctor PARAMS ((struct d_info *,
- enum gnu_v3_ctor_kinds,
- struct d_comp *));
-static struct d_comp *d_make_dtor PARAMS ((struct d_info *,
- enum gnu_v3_dtor_kinds,
- struct d_comp *));
static struct d_comp *d_make_template_param PARAMS ((struct d_info *, long));
static struct d_comp *d_make_sub PARAMS ((struct d_info *, const char *, int));
static struct d_comp *d_mangled_name PARAMS ((struct d_info *, int));
@@ -548,7 +265,6 @@ static void d_print_append_char PARAMS (
static void d_print_append_buffer PARAMS ((struct d_print_info *, const char *,
size_t));
static void d_print_error PARAMS ((struct d_print_info *));
-static char *d_print PARAMS ((int, const struct d_comp *, int, size_t *));
static void d_print_comp PARAMS ((struct d_print_info *,
const struct d_comp *));
static void d_print_java_identifier PARAMS ((struct d_print_info *,
@@ -567,7 +283,6 @@ static void d_print_expr_op PARAMS ((str
const struct d_comp *));
static void d_print_cast PARAMS ((struct d_print_info *,
const struct d_comp *));
-static void d_init_info PARAMS ((const char *, int, size_t, struct d_info *));
static char *d_demangle PARAMS ((const char *, int, size_t *));
#ifdef CP_DEMANGLE_DEBUG
@@ -752,7 +467,7 @@ d_dump (dc, indent)
/* Add a new component. */
-static struct d_comp *
+struct d_comp *
d_make_empty (di, type)
struct d_info *di;
enum d_comp_type type;
@@ -769,7 +484,7 @@ d_make_empty (di, type)
/* Add a new generic component. */
-static struct d_comp *
+struct d_comp *
d_make_comp (di, type, left, right)
struct d_info *di;
enum d_comp_type type;
@@ -861,7 +576,7 @@ d_make_comp (di, type, left, right)
/* Add a new name component. */
-static struct d_comp *
+struct d_comp *
d_make_name (di, s, len)
struct d_info *di;
const char *s;
@@ -882,7 +597,7 @@ d_make_name (di, s, len)
/* Add a new builtin type component. */
-static struct d_comp *
+struct d_comp *
d_make_builtin_type (di, type)
struct d_info *di;
const struct d_builtin_type_info *type;
@@ -899,7 +614,7 @@ d_make_builtin_type (di, type)
/* Add a new operator component. */
-static struct d_comp *
+struct d_comp *
d_make_operator (di, op)
struct d_info *di;
const struct d_operator_info *op;
@@ -914,7 +629,7 @@ d_make_operator (di, op)
/* Add a new extended operator component. */
-static struct d_comp *
+struct d_comp *
d_make_extended_operator (di, args, name)
struct d_info *di;
int args;
@@ -935,7 +650,7 @@ d_make_extended_operator (di, args, name
/* Add a new constructor component. */
-static struct d_comp *
+struct d_comp *
d_make_ctor (di, kind, name)
struct d_info *di;
enum gnu_v3_ctor_kinds kind;
@@ -956,7 +671,7 @@ d_make_ctor (di, kind, name)
/* Add a new destructor component. */
-static struct d_comp *
+struct d_comp *
d_make_dtor (di, kind, name)
struct d_info *di;
enum gnu_v3_dtor_kinds kind;
@@ -1429,7 +1144,7 @@ d_identifier (di, len)
#define NL(s) s, (sizeof s) - 1
-static const struct d_operator_info d_operators[] =
+const struct d_operator_info d_operators[] =
{
{ "aN", NL ("&="), 2 },
{ "aS", NL ("="), 2 },
@@ -1753,7 +1468,7 @@ d_ctor_dtor_name (di)
::= u <source-name>
*/
-static const struct d_builtin_type_info d_builtin_types[26] =
+const struct d_builtin_type_info d_builtin_types[26] =
{
/* a */ { NL ("signed char"), NL ("signed char"), D_PRINT_INT },
/* b */ { NL ("bool"), NL ("boolean"), D_PRINT_BOOL },
@@ -2712,7 +2427,7 @@ d_print_error (dpi)
sets *PALC to 0 for a bad parse, or to 1 for a memory allocation
failure. */
-static char *
+char *
d_print (options, dc, estimate, palc)
int options;
const struct d_comp *dc;
@@ -3724,7 +3439,7 @@ d_print_cast (dpi, dc)
/* Initialize the information structure we use to pass around
information. */
-static void
+void
d_init_info (mangled, options, len, di)
const char *mangled;
int options;