]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - include/demangle.h
* libiberty/cplus-dem.c
[thirdparty/gcc.git] / include / demangle.h
index 00f6a0c3bc0a87d24a8f06f3ce809082a88da4e7..2ebc2a5043f4beacf721daea688602747b2e3e23 100644 (file)
 #if !defined (DEMANGLE_H)
 #define DEMANGLE_H
 
-#ifdef IN_GCC
-#include "gansidecl.h"
-#define PARAMS(ARGS) PROTO(ARGS)
-#else /* ! IN_GCC */
 #include <ansidecl.h>
-#endif /* IN_GCC */
 
 /* Options passed to cplus_demangle (in 2nd parameter). */
 
 #define DMGL_GNU       (1 << 9)
 #define DMGL_LUCID     (1 << 10)
 #define DMGL_ARM       (1 << 11)
+#define DMGL_HP        (1 << 12)       /* For the HP aCC compiler; same as ARM
+                                           except for template arguments, etc. */
+#define DMGL_EDG       (1 << 13)
+
 /* If none of these are set, use 'current_demangling_style' as the default. */
-#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM)
+#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG)
 
 /* Enumeration of possible demangling styles.
 
@@ -55,7 +54,9 @@ extern enum demangling_styles
   auto_demangling = DMGL_AUTO,
   gnu_demangling = DMGL_GNU,
   lucid_demangling = DMGL_LUCID,
-  arm_demangling = DMGL_ARM
+  arm_demangling = DMGL_ARM,
+  hp_demangling = DMGL_HP,
+  edg_demangling = DMGL_EDG
 } current_demangling_style;
 
 /* Define string names for the various demangling styles. */
@@ -64,6 +65,8 @@ extern enum demangling_styles
 #define GNU_DEMANGLING_STYLE_STRING    "gnu"
 #define LUCID_DEMANGLING_STYLE_STRING  "lucid"
 #define ARM_DEMANGLING_STYLE_STRING    "arm"
+#define HP_DEMANGLING_STYLE_STRING     "hp"
+#define EDG_DEMANGLING_STYLE_STRING    "edg"
 
 /* Some macros to test what demangling style is active. */
 
@@ -71,7 +74,19 @@ extern enum demangling_styles
 #define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
 #define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
 #define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
-#define ARM_DEMANGLING (CURRENT_DEMANGLING_STYLE & DMGL_ARM)
+#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM)
+#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
+#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
+
+/* Provide information about the available demangle styles. This code is
+   pulled from gdb into libiberty because it is useful to binutils also.  */
+
+extern struct demangler_engine
+{
+  char *demangling_style_name;
+  enum demangling_styles demangling_style;
+  char *demangling_style_doc;
+} libiberty_demanglers[];
 
 extern char *
 cplus_demangle PARAMS ((const char *mangled, int options));
@@ -87,4 +102,9 @@ cplus_mangle_opname PARAMS ((const char *opname, int options));
 extern void
 set_cplus_marker_for_demangling PARAMS ((int ch));
 
+extern enum demangling_styles 
+cplus_demangle_set_style PARAMS ((enum demangling_styles style));
+
+extern enum demangling_styles 
+cplus_demangle_name_to_style PARAMS ((const char *name));
 #endif /* DEMANGLE_H */