projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename type entity into ir_entity
[libfirm]
/
ir
/
tr
/
trvrfy.c
diff --git
a/ir/tr/trvrfy.c
b/ir/tr/trvrfy.c
index
47fd88d
..
80e1752
100644
(file)
--- a/
ir/tr/trvrfy.c
+++ b/
ir/tr/trvrfy.c
@@
-86,7
+86,7
@@
static void show_ent_not_supertp(entity *ent, entity *ovw)
}
/**
}
/**
- * Show diagnostic if an entity o
w
erwrites a wrong number of things.
+ * Show diagnostic if an entity o
v
erwrites a wrong number of things.
*/
static void show_ent_overwrite_cnt(entity *ent)
{
*/
static void show_ent_overwrite_cnt(entity *ent)
{
@@
-94,14
+94,15
@@
static void show_ent_overwrite_cnt(entity *ent)
int i, j, k, found, show_stp = 0;
fprintf(stderr, "Type verification error:\n");
int i, j, k, found, show_stp = 0;
fprintf(stderr, "Type verification error:\n");
- ir_fprintf(stderr, "Entity %
+F::%+
e owerwrites\n", owner, ent);
+ ir_fprintf(stderr, "Entity %
t::%
e owerwrites\n", owner, ent);
for (i = 0; i < get_entity_n_overwrites(ent); ++i) {
entity *ovw = get_entity_overwrites(ent, i);
ir_type *ov_own = get_entity_owner(ovw);
for (i = 0; i < get_entity_n_overwrites(ent); ++i) {
entity *ovw = get_entity_overwrites(ent, i);
ir_type *ov_own = get_entity_owner(ovw);
+ ir_fprintf(stderr, " %t::%e\n", ov_own, ovw);
for (k = 0; k < i; ++k)
if (ovw == get_entity_overwrites(ent, k)) {
for (k = 0; k < i; ++k)
if (ovw == get_entity_overwrites(ent, k)) {
- ir_fprintf(stderr, "
%+F::%+
e entered more than once\n", ov_own, ovw);
+ ir_fprintf(stderr, "
->%t::%
e entered more than once\n", ov_own, ovw);
break;
}
break;
}
@@
-113,14
+114,14
@@
static void show_ent_overwrite_cnt(entity *ent)
}
}
if (! found)
}
}
if (! found)
- ir_fprintf(stderr, "
%+F::%+e not in super types of %t\n", ov_own, ovw
, owner);
+ ir_fprintf(stderr, "
->%t not in super types of %t\n", ov_own
, owner);
}
if (show_stp) {
}
if (show_stp) {
- ir_fprintf(stderr, "Supertypes of %
+F
:\n", owner);
+ ir_fprintf(stderr, "Supertypes of %
t
:\n", owner);
for (i = 0; i < get_class_n_supertypes(owner); ++i) {
ir_type *super = get_class_supertype(owner, i);
for (i = 0; i < get_class_n_supertypes(owner); ++i) {
ir_type *super = get_class_supertype(owner, i);
- ir_fprintf(stderr, " %
+F
:\n", super);
+ ir_fprintf(stderr, " %
t
:\n", super);
}
}
}
}
}
}
@@
-308,6
+309,16
@@
static int constants_on_wrong_irg(entity *ent) {
return 0;
}
return 0;
}
+/**
+ * Shows a wrong entity allocation
+ */
+static void show_ent_alloc_error(entity *ent)
+{
+ ir_fprintf(stderr, "%+e owner %t has allocation %s\n",
+ ent, get_entity_type(ent),
+ get_allocation_name(get_entity_allocation(ent)));
+}
+
/*
* Check an entity. Currently, we check only if initialized constants
* are build on the const irg graph.
/*
* Check an entity. Currently, we check only if initialized constants
* are build on the const irg graph.
@@
-365,7
+376,7
@@
int check_entity(entity *ent) {
get_entity_allocation(ent) != allocation_automatic,
"Entities in global type are not allowed to by dynamic or automatic allocated",
error_glob_ent_allocation,
get_entity_allocation(ent) != allocation_automatic,
"Entities in global type are not allowed to by dynamic or automatic allocated",
error_glob_ent_allocation,
-
ir_fprintf(stderr, "%+e\n",
ent)
+
show_ent_alloc_error(
ent)
);
}
);
}