projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55766c7
)
make get_entity_irg return NULL for non methods as documented in typerep.h
author
Matthias Braun
<matze@braunis.de>
Tue, 13 Jan 2009 12:03:14 +0000
(12:03 +0000)
committer
Matthias Braun
<matze@braunis.de>
Tue, 13 Jan 2009 12:03:14 +0000
(12:03 +0000)
[r25163]
ir/tr/entity_t.h
patch
|
blob
|
history
diff --git
a/ir/tr/entity_t.h
b/ir/tr/entity_t.h
index
cc5e82f
..
92aee12
100644
(file)
--- a/
ir/tr/entity_t.h
+++ b/
ir/tr/entity_t.h
@@
-420,7
+420,10
@@
static inline ir_graph *
_get_entity_irg(const ir_entity *ent) {
ir_graph *irg;
assert(ent && ent->kind == k_entity);
- assert(ent == unknown_entity || is_Method_type(ent->type));
+ if (!is_Method_type(ent->type) || ent == unknown_entity) {
+ return NULL;
+ }
+
irg = ent->attr.mtd_attr.irg;
if (irg != NULL && !get_visit_pseudo_irgs() && is_pseudo_ir_graph(irg))
return NULL;