compileable with -Wall and bugfixing
[libfirm] / ir / tr / mangle.c
index 2ac4532..d1210db 100644 (file)
@@ -11,6 +11,7 @@
 # include <config.h>
 #endif
 
+# include "xprintf.h"
 # include "mangle.h"
 # include <obstack.h>
 # include "obst.h"
@@ -59,12 +60,26 @@ mangle_type (type *type)
   return res;
 }
 
-/* Returns a new ident that represents first_scnd. */
+/* Returns a new ident that represents firstscnd. */
 ident *mangle (ident *first, ident* scnd) {
   char *cp;
   int len;
   ident *res;
 
+  xoprintf (&mangle_obst, "%I%I",  first, scnd);
+  len = obstack_object_size (&mangle_obst);
+  cp = obstack_finish (&mangle_obst);
+  res = id_from_str (cp, len);
+  obstack_free (&mangle_obst, cp);
+  return res;
+}
+
+/* Returns a new ident that represents first_scnd. */
+ident *mangle_u (ident *first, ident* scnd) {
+  char *cp;
+  int len;
+  ident *res;
+
   xoprintf (&mangle_obst, "%I_%I",  first, scnd);
   len = obstack_object_size (&mangle_obst);
   cp = obstack_finish (&mangle_obst);
@@ -73,6 +88,7 @@ ident *mangle (ident *first, ident* scnd) {
   return res;
 }
 
+
 void
 init_mangle (void)
 {