Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
7 7u83 2
 * Copyright (c) 2002-2006 The TenDRA Project <http://www.tendra.org/>.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific, prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 *
29
 * $Id$
30
 */
31
/*
2 7u83 32
    		 Crown Copyright (c) 1997
7 7u83 33
 
2 7u83 34
    This TenDRA(r) Computer Program is subject to Copyright
35
    owned by the United Kingdom Secretary of State for Defence
36
    acting through the Defence Evaluation and Research Agency
37
    (DERA).  It is made available to Recipients with a
38
    royalty-free licence for its use, reproduction, transfer
39
    to other parties and amendment for any purpose not excluding
40
    product development provided that any such use et cetera
41
    shall be deemed to be acceptance of the following conditions:-
7 7u83 42
 
2 7u83 43
        (1) Its Recipients shall ensure that this Notice is
44
        reproduced upon any copies or amended versions of it;
7 7u83 45
 
2 7u83 46
        (2) Any amended version of it shall be clearly marked to
47
        show both the nature of and the organisation responsible
48
        for the relevant amendment or amendments;
7 7u83 49
 
2 7u83 50
        (3) Its onward transfer from a recipient to another
51
        party shall be deemed to be that party's acceptance of
52
        these conditions;
7 7u83 53
 
2 7u83 54
        (4) DERA gives no warranty or assurance as to its
55
        quality or suitability for any purpose and DERA accepts
56
        no liability whatsoever in relation to any use to which
57
        it may be put.
58
*/
59
 
60
 
61
#ifndef MANGLE_INCLUDED
62
#define MANGLE_INCLUDED
63
 
64
 
65
/*
66
    NAME MANGLING DECLARATIONS
67
 
68
    The routines in this module are concerned with name mangling.
69
*/
70
 
7 7u83 71
extern string mangle_name(IDENTIFIER, int, int);
72
extern string mangle_literal(INT_TYPE);
73
extern string mangle_diag(IDENTIFIER, int);
74
extern string mangle_common(string, IDENTIFIER);
75
extern string mangle_typeid(CONST char *, CLASS_TYPE);
76
extern string mangle_tname(CONST char *, TYPE);
77
extern string mangle_vtable(CONST char *, GRAPH);
78
extern string mangle_anon(void);
79
extern string mangle_init(void);
80
extern unsigned long mangle_length;
81
extern char mangle_ntype[][3];
82
extern int mangle_signature;
83
extern int mangle_objects;
84
extern BUFFER mangle_buff;
85
extern ulong common_no;
2 7u83 86
 
87
 
88
/*
89
    NAME MANGLING CODES
90
 
91
    This macros give the encodings used in the mangling routines.  The
92
    built-in integral and floating-point types are given in the array
93
    mangle_ntype.
94
*/
95
 
96
#define MANGLE_char		'c'
97
#define MANGLE_short		's'
98
#define MANGLE_int		'i'
99
#define MANGLE_long		'l'
100
#define MANGLE_llong		'x'
101
#define MANGLE_float		'f'
102
#define MANGLE_double		'd'
103
#define MANGLE_ldouble		'r'
104
#define MANGLE_void		'v'
105
#define MANGLE_bottom		'u'
106
#define MANGLE_bool		'b'
107
#define MANGLE_ptrdiff_t	'y'
108
#define MANGLE_size_t		'z'
109
#define MANGLE_wchar_t		'w'
110
#define MANGLE_signed		'S'
111
#define MANGLE_unsigned		'U'
112
 
113
#define MANGLE_ptr		'P'
114
#define MANGLE_ref		'R'
115
#define MANGLE_ptr_mem		'M'
116
#define MANGLE_func		'F'
117
#define MANGLE_weak		'W'
118
#define MANGLE_array		'A'
119
#define MANGLE_bitfield		'B'
120
#define MANGLE_arith		'a'
121
#define MANGLE_literal		'n'
122
#define MANGLE_octal		'O'
123
#define MANGLE_hex		'X'
124
#define MANGLE_promote		'p'
125
#define MANGLE_unpromote	'q'
126
 
127
#define MANGLE_const		'C'
128
#define MANGLE_volatile		'V'
129
#define MANGLE_c_lang		'L'
130
 
131
#define MANGLE_nat		'I'
132
#define MANGLE_stmt		'V'
133
#define MANGLE_type		'Z'
134
#define MANGLE_self		'X'
135
#define MANGLE_repeat		'T'
136
#define MANGLE_multi		'N'
137
#define MANGLE_template		't'
138
#define MANGLE_templ_param	'm'
139
#define MANGLE_func_templ	'G'
140
#define MANGLE_ellipsis		'e'
141
#define MANGLE_neg		'h'
142
#define MANGLE_op		'o'
143
#define MANGLE_qual		'Q'
144
#define MANGLE_unicode4		'k'
145
#define MANGLE_unicode8		'K'
146
 
147
#define MANGLE_sep		'_'
148
#define MANGLE_colon		':'
149
#define MANGLE_comma		','
150
#define MANGLE_dot		'.'
151
#define MANGLE_error		'*'
152
 
153
#define MANGLE_WORTH		10
154
 
155
 
156
#endif