projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added missing casts.
[libfirm]
/
ir
/
be
/
bestabs.c
diff --git
a/ir/be/bestabs.c
b/ir/be/bestabs.c
index
05e8fd4
..
a385da5
100644
(file)
--- a/
ir/be/bestabs.c
+++ b/
ir/be/bestabs.c
@@
-22,7
+22,6
@@
* @brief Stabs support.
* @author Michael Beck
* @date 11.9.2006
* @brief Stabs support.
* @author Michael Beck
* @date 11.9.2006
- * @version $Id$
*/
#include "config.h"
*/
#include "config.h"
@@
-131,19
+130,19
@@
typedef struct stabs_handle {
*/
static unsigned get_type_number(stabs_handle *h, ir_type *tp)
{
*/
static unsigned get_type_number(stabs_handle *h, ir_type *tp)
{
-
pmap_entry
*entry;
+
void
*entry;
unsigned num;
if (tp == NULL) {
/* map to the void type */
return 0;
}
unsigned num;
if (tp == NULL) {
/* map to the void type */
return 0;
}
- entry = pmap_
find
(h->type_map, tp);
- if (
! entry
) {
+ entry = pmap_
get
(h->type_map, tp);
+ if (
entry == NULL
) {
num = h->next_type_nr++;
num = h->next_type_nr++;
- pmap_insert(h->type_map, tp, INT_TO_PTR(num));
+ pmap_insert(h->type_map, tp, INT_TO_PTR(num
+1
));
} else {
} else {
- num = (
unsigned)PTR_TO_INT(entry->value)
;
+ num = (
(unsigned)PTR_TO_INT(entry))-1
;
}
return num;
}
}
return num;
}
@@
-153,7
+152,7
@@
static unsigned get_type_number(stabs_handle *h, ir_type *tp)
*/
static void map_to_void(stabs_handle *h, ir_type *tp)
{
*/
static void map_to_void(stabs_handle *h, ir_type *tp)
{
- pmap_insert(h->type_map, tp, INT_TO_PTR(
0
));
+ pmap_insert(h->type_map, tp, INT_TO_PTR(
1
));
}
/**
}
/**
@@
-518,7
+517,7
@@
static void walk_type(type_or_ent tore, void *ctx)
tp = tore.typ;
/* ignore the unknown type */
tp = tore.typ;
/* ignore the unknown type */
- if (
tp == firm_unknown_type
)
+ if (
is_unknown_type(tp)
)
return;
} else {
return;
return;
} else {
return;
@@
-528,41
+527,43
@@
static void walk_type(type_or_ent tore, void *ctx)
case tpo_class:
if (tp == get_glob_type()) {
SET_TYPE_READY(tp);
case tpo_class:
if (tp == get_glob_type()) {
SET_TYPE_READY(tp);
-
break
;
+
return
;
}
/* fall through */
case tpo_struct:
case tpo_union:
gen_struct_union_type(env, tp);
}
/* fall through */
case tpo_struct:
case tpo_union:
gen_struct_union_type(env, tp);
-
break
;
+
return
;
case tpo_enumeration:
gen_enum_type(env->h, tp);
case tpo_enumeration:
gen_enum_type(env->h, tp);
-
break
;
+
return
;
case tpo_primitive:
gen_primitive_type(env->h, tp);
case tpo_primitive:
gen_primitive_type(env->h, tp);
-
break
;
+
return
;
case tpo_method:
gen_method_type(env, tp);
case tpo_method:
gen_method_type(env, tp);
-
break
;
+
return
;
case tpo_array:
gen_array_type(env, tp);
case tpo_array:
gen_array_type(env, tp);
-
break
;
+
return
;
case tpo_pointer:
gen_pointer_type(env, tp);
case tpo_pointer:
gen_pointer_type(env, tp);
-
break
;
+
return
;
+ case tpo_code:
+ case tpo_none:
case tpo_unknown:
case tpo_unknown:
+ case tpo_uninitialized:
/* the unknown type: ignore */
SET_TYPE_READY(tp);
/* the unknown type: ignore */
SET_TYPE_READY(tp);
- break;
- default:
- assert(! "Unknown tpop code");
+ return;
}
}
+ panic("Unknown tpop code");
}
/**
}
/**