projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ccc6674
)
Fixed misplaced assert
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 18 Apr 2007 15:38:26 +0000
(15:38 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 18 Apr 2007 15:38:26 +0000
(15:38 +0000)
[r13383]
ir/ir/irnode_t.h
patch
|
blob
|
history
diff --git
a/ir/ir/irnode_t.h
b/ir/ir/irnode_t.h
index
9c7bf41
..
d64f1b4
100644
(file)
--- a/
ir/ir/irnode_t.h
+++ b/
ir/ir/irnode_t.h
@@
-427,8
+427,12
@@
_get_irn_intra_n(const ir_node *node, int n) {
assert(-1 <= n && n < _get_irn_intra_arity(node));
nn = node->in[n + 1];
assert(-1 <= n && n < _get_irn_intra_arity(node));
nn = node->in[n + 1];
- assert(nn != NULL);
- if (!nn || (nn->op != op_Id)) return nn;
+ if (nn == NULL) {
+ /* only block inputs are allowed to be NULL */
+ assert(n == -1 && "NULL input of a node");
+ return NULL;
+ }
+ if (nn->op != op_Id) return nn;
return (node->in[n + 1] = skip_Id(nn));
}
return (node->in[n + 1] = skip_Id(nn));
}