source: trunk/src/gcc/include/demangle.h@ 1968

Last change on this file since 1968 was 1392, checked in by bird, 22 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 6.0 KB
Line 
1/* Defs for interface to demanglers.
2 Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002
3 Free Software Foundation, Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
19
20
21#if !defined (DEMANGLE_H)
22#define DEMANGLE_H
23
24#include "ansidecl.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif /* __cplusplus */
29
30/* Options passed to cplus_demangle (in 2nd parameter). */
31
32#define DMGL_NO_OPTS 0 /* For readability... */
33#define DMGL_PARAMS (1 << 0) /* Include function args */
34#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
35#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
36#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */
37#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */
38
39#define DMGL_AUTO (1 << 8)
40#define DMGL_GNU (1 << 9)
41#define DMGL_LUCID (1 << 10)
42#define DMGL_ARM (1 << 11)
43#define DMGL_HP (1 << 12) /* For the HP aCC compiler;
44 same as ARM except for
45 template arguments, etc. */
46#define DMGL_EDG (1 << 13)
47#define DMGL_GNU_V3 (1 << 14)
48#define DMGL_GNAT (1 << 15)
49
50/* If none of these are set, use 'current_demangling_style' as the default. */
51#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT)
52
53/* Enumeration of possible demangling styles.
54
55 Lucid and ARM styles are still kept logically distinct, even though
56 they now both behave identically. The resulting style is actual the
57 union of both. I.E. either style recognizes both "__pt__" and "__rf__"
58 for operator "->", even though the first is lucid style and the second
59 is ARM style. (FIXME?) */
60
61extern enum demangling_styles
62{
63 no_demangling = -1,
64 unknown_demangling = 0,
65 auto_demangling = DMGL_AUTO,
66 gnu_demangling = DMGL_GNU,
67 lucid_demangling = DMGL_LUCID,
68 arm_demangling = DMGL_ARM,
69 hp_demangling = DMGL_HP,
70 edg_demangling = DMGL_EDG,
71 gnu_v3_demangling = DMGL_GNU_V3,
72 java_demangling = DMGL_JAVA,
73 gnat_demangling = DMGL_GNAT
74} current_demangling_style;
75
76/* Define string names for the various demangling styles. */
77
78#define NO_DEMANGLING_STYLE_STRING "none"
79#define AUTO_DEMANGLING_STYLE_STRING "auto"
80#define GNU_DEMANGLING_STYLE_STRING "gnu"
81#define LUCID_DEMANGLING_STYLE_STRING "lucid"
82#define ARM_DEMANGLING_STYLE_STRING "arm"
83#define HP_DEMANGLING_STYLE_STRING "hp"
84#define EDG_DEMANGLING_STYLE_STRING "edg"
85#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3"
86#define JAVA_DEMANGLING_STYLE_STRING "java"
87#define GNAT_DEMANGLING_STYLE_STRING "gnat"
88
89/* Some macros to test what demangling style is active. */
90
91#define CURRENT_DEMANGLING_STYLE current_demangling_style
92#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
93#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
94#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
95#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM)
96#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
97#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
98#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3)
99#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA)
100#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT)
101