134c240523ace9143f68e5aa9cf7d788ece8f63b
[libfirm] / ir / tr / mangle.h
1 /*
2  * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /*
21  * Project:     libFIRM
22  * File name:   ir/tr/mangle.h
23  * Purpose:     Methods to manipulate names.
24  * Author:      Martin Trapp, Christian Schaefer
25  * Modified by: Goetz Lindenmaier
26  * Created:
27  * CVS-ID:      $Id$
28  * Copyright:   (c) 1998-2003 Universität Karlsruhe
29  */
30
31 /**
32  * @file mangle.h
33  *
34  * FIRM name mangling -- methods to manipulate names.
35  *
36  * @author Martin Trapp, Christian Schaefer
37  */
38
39 #ifndef _MANGLE_H_
40 #define _MANGLE_H_
41
42 #include "ident.h"
43 #include "entity.h"
44
45 /** initializes the name mangling code */
46 void   firm_init_mangle (void);
47
48 /** Computes a definite name for this entity by concatenating
49    the name of the owner type and the name of the entity with
50    a separating "_". */
51 ident *mangle_entity (ir_entity *ent);
52
53 /** mangle underscore: Returns a new ident that represents first_scnd. */
54 ident *mangle_u (ident *first, ident* scnd);
55
56 /** mangle dot: Returns a new ident that represents first.scnd. */
57 ident *mangle_dot (ident *first, ident* scnd);
58
59 /** mangle: Returns a new ident that represents firstscnd. */
60 ident *mangle   (ident *first, ident* scnd);
61
62 /** returns a mangled name for a Win32 function using it's calling convention */
63 ident *decorate_win32_c_fkt(ir_entity *ent, ident *id);
64
65 #endif /* _MANGLE_H_ */