Updated for new libFirm.
[libfirm] / win32 / firmEvaluator / firm.c
index a664825..d4c77a5 100644 (file)
@@ -254,8 +254,14 @@ static HRESULT format_type(DEBUGHELPER *pHelper, int nBase, const void *addr, ch
     _tcsncat(pResult, " ", max);
   }
 
-  if (format_ident(pHelper, tp.name, name, sizeof(name)) != S_OK)
-    return E_FAIL;
+  name[0] = '\0';
+  if (tp.name) {
+    if (format_ident(pHelper, tp.name, name, sizeof(name)) != S_OK)
+      return E_FAIL;
+  } else {
+    if (format_mode(pHelper, tp.mode, name, sizeof(name)) != S_OK)
+      return E_FAIL;
+  }
 
   _tcsncat(pResult, name, max);
   switch (nBase) {
@@ -369,7 +375,7 @@ do {                                                            \
     s[len] = '\0';                                              \
     str = s;                                                    \
   }                                                             \
-} while(0)
+} while (0)
 
 /**
  * format a tarval
@@ -531,12 +537,6 @@ static HRESULT format_node(DEBUGHELPER *pHelper, int nBase, const void *addr, ch
         return E_FAIL;
       _tcsncat(pResult, name, max);
       break;
-    case symconst_addr_name:
-      _tcsncat(pResult, "NAME:", max);
-      if (format_ident(pHelper, n.attr.symc.sym.ident_p, name, sizeof(name)) != S_OK)
-        return E_FAIL;
-      _tcsncat(pResult, name, max);
-      break;
     case symconst_addr_ent:
       _tcsncat(pResult, "ENT:", max);
       if (format_entity(pHelper, nBase, n.attr.symc.sym.entity_p, name, sizeof(name), 0) != S_OK)
@@ -842,7 +842,8 @@ struct set {
  * Find the longest chain of a pset
  */
 static HRESULT find_longest_pset_chain(DEBUGHELPER *pHelper, pset *set,
-                                       int *chains, int *lenght, size_t *size) {
+                                       int *chains, int *lenght, size_t *size)
+{
   unsigned i, j;
   pset_Segment *seg, *curr;
   pset_Element elem;
@@ -882,7 +883,8 @@ static HRESULT find_longest_pset_chain(DEBUGHELPER *pHelper, pset *set,
  * Find the longest chain of a set
  */
 static HRESULT find_longest_set_chain(DEBUGHELPER *pHelper, set *set,
-                                      int *chains, int *lenght, size_t *size) {
+                                      int *chains, int *lenght, size_t *size)
+{
   unsigned i, j;
   set_Segment *seg, *curr;
   set_Element elem;