summaryrefslogtreecommitdiffhomepage
path: root/ir/ident
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2010-02-13 12:51:14 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2010-02-13 12:51:14 +0100
commit32ea6ea0320f551448bb66e534e3351977464d42 (patch)
treef19b9fb944026d298c464028aa7671f424d4c6f5 /ir/ident
parent6b124543aff56817fcfe6d5b5ff181ac5c790e73 (diff)
Put opening curly brace of functions on a separate line.
[r27145]
Diffstat (limited to 'ir/ident')
-rw-r--r--ir/ident/ident.c6
-rw-r--r--ir/ident/mangle.c27
2 files changed, 22 insertions, 11 deletions
diff --git a/ir/ident/ident.c b/ir/ident/ident.c
index f129eb5..bb2e4ea 100644
--- a/ir/ident/ident.c
+++ b/ir/ident/ident.c
@@ -112,7 +112,8 @@ static int set_get_id_strlen(void *handle, ident *id)
/**
* Default implementation using libfirm sets.
*/
-void set_finish_ident(void *handle) {
+void set_finish_ident(void *handle)
+{
set *id_set = handle;
del_set(id_set);
@@ -177,7 +178,8 @@ int get_id_strlen(ident *id)
return impl.get_id_strlen(impl.handle, id);
}
-void finish_ident(void) {
+void finish_ident(void)
+{
if (impl.finish_ident)
impl.finish_ident(impl.handle);
}
diff --git a/ir/ident/mangle.c b/ir/ident/mangle.c
index 04cde84..175bd21 100644
--- a/ir/ident/mangle.c
+++ b/ir/ident/mangle.c
@@ -39,12 +39,14 @@
static struct obstack mangle_obst;
/** returned a mangled type name, currently no mangling */
-static inline ident *mangle_type(ir_type *tp) {
+static inline ident *mangle_type(ir_type *tp)
+{
assert(tp->kind == k_type);
return tp->name;
}
-ident *id_mangle_entity(ir_entity *ent) {
+ident *id_mangle_entity(ir_entity *ent)
+{
ident *type_id;
char *cp;
int len;
@@ -63,7 +65,8 @@ ident *id_mangle_entity(ir_entity *ent) {
/* Returns a new ident that represents 'firstscnd'. */
-ident *id_mangle(ident *first, ident *scnd) {
+ident *id_mangle(ident *first, ident *scnd)
+{
char *cp;
int len;
ident *res;
@@ -78,7 +81,8 @@ ident *id_mangle(ident *first, ident *scnd) {
}
/** Returns a new ident that represents 'prefixscndsuffix'. */
-ident *id_mangle3(const char *prefix, ident *scnd, const char *suffix) {
+ident *id_mangle3(const char *prefix, ident *scnd, const char *suffix)
+{
char *cp;
int len;
ident *res;
@@ -94,7 +98,8 @@ ident *id_mangle3(const char *prefix, ident *scnd, const char *suffix) {
}
/** Returns a new ident that represents first<c>scnd. */
-static ident *id_mangle_3(ident *first, char c, ident* scnd) {
+static ident *id_mangle_3(ident *first, char c, ident* scnd)
+{
char *cp;
int len;
ident *res;
@@ -110,17 +115,20 @@ static ident *id_mangle_3(ident *first, char c, ident* scnd) {
}
/* Returns a new ident that represents first_scnd. */
-ident *id_mangle_u(ident *first, ident* scnd) {
+ident *id_mangle_u(ident *first, ident* scnd)
+{
return id_mangle_3(first, '_', scnd);
}
/* Returns a new ident that represents first.scnd. */
-ident *id_mangle_dot(ident *first, ident* scnd) {
+ident *id_mangle_dot(ident *first, ident* scnd)
+{
return id_mangle_3(first, '.', scnd);
}
/* returns a mangled name for a Win32 function using it's calling convention */
-ident *id_decorate_win32_c_fkt(ir_entity *ent, ident *id) {
+ident *id_decorate_win32_c_fkt(ir_entity *ent, ident *id)
+{
ir_type *tp = get_entity_type(ent);
unsigned cc_mask = get_method_calling_convention(tp);
char buf[16];
@@ -144,6 +152,7 @@ ident *id_decorate_win32_c_fkt(ir_entity *ent, ident *id) {
return id;
}
-void firm_init_mangle(void) {
+void firm_init_mangle(void)
+{
obstack_init(&mangle_obst);
}