]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/demangle.h
Warning Fixes:
[thirdparty/gcc.git] / gcc / demangle.h
CommitLineData
a3184468 1/* Defs for interface to demanglers.
47fd14f4 2 Copyright 1992, 1995, 1996 Free Software Foundation, Inc.
a3184468
JM
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
940d9d63
RK
16 Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
a3184468
JM
18
19
20#if !defined (DEMANGLE_H)
21#define DEMANGLE_H
22
23#ifdef IN_GCC
6938ca92 24#include "gansidecl.h"
a3184468 25#define PARAMS(ARGS) PROTO(ARGS)
a3184468
JM
26#else /* ! IN_GCC */
27#include <ansidecl.h>
28#endif /* IN_GCC */
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 */
72fa4f0a 35#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
a3184468
JM
36
37#define DMGL_AUTO (1 << 8)
38#define DMGL_GNU (1 << 9)
39#define DMGL_LUCID (1 << 10)
40#define DMGL_ARM (1 << 11)
41/* If none of these are set, use 'current_demangling_style' as the default. */
42#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM)
43
44/* Enumeration of possible demangling styles.
45
46 Lucid and ARM styles are still kept logically distinct, even though
47 they now both behave identically. The resulting style is actual the
48 union of both. I.E. either style recognizes both "__pt__" and "__rf__"
49 for operator "->", even though the first is lucid style and the second
50 is ARM style. (FIXME?) */
51
52extern enum demangling_styles
53{
54 unknown_demangling = 0,
55 auto_demangling = DMGL_AUTO,
56 gnu_demangling = DMGL_GNU,
57 lucid_demangling = DMGL_LUCID,
58 arm_demangling = DMGL_ARM
59} current_demangling_style;
60
61/* Define string names for the various demangling styles. */
62
63#define AUTO_DEMANGLING_STYLE_STRING "auto"
64#define GNU_DEMANGLING_STYLE_STRING "gnu"
65#define LUCID_DEMANGLING_STYLE_STRING "lucid"
66#define ARM_DEMANGLING_STYLE_STRING "arm"
67
68/* Some macros to test what demangling style is active. */
69
70#define CURRENT_DEMANGLING_STYLE current_demangling_style
71#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
72#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
73#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
74#define ARM_DEMANGLING (CURRENT_DEMANGLING_STYLE & DMGL_ARM)
75
76extern char *
77cplus_demangle PARAMS ((const char *mangled, int options));
78
79extern int
47fd14f4 80cplus_demangle_opname PARAMS ((const char *opname, char *result, int options));
a3184468 81
47fd14f4
ILT
82extern const char *
83cplus_mangle_opname PARAMS ((const char *opname, int options));
a3184468
JM
84
85/* Note: This sets global state. FIXME if you care about multi-threading. */
86
87extern void
88set_cplus_marker_for_demangling PARAMS ((int ch));
89
487a6e06
KG
90extern void
91do_tlink PARAMS ((char **, char **));
92
93extern void
94collect_execute PARAMS ((char *, char **, char *));
95
96extern void
97collect_exit PARAMS ((int));
98
99extern int
100collect_wait PARAMS ((char *));
101
102extern void
103dump_file PARAMS ((char *));
104
105extern int
106file_exists PARAMS ((char *));
107
a3184468 108#endif /* DEMANGLE_H */