projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f37b4db
)
do NOT overwrite custom hash function
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 23 Jul 2008 15:10:26 +0000
(15:10 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 23 Jul 2008 15:10:26 +0000
(15:10 +0000)
[r20630]
ir/ir/iropt.c
patch
|
blob
|
history
diff --git
a/ir/ir/iropt.c
b/ir/ir/iropt.c
index
907a8fe
..
7603a49
100644
(file)
--- a/
ir/ir/iropt.c
+++ b/
ir/ir/iropt.c
@@
-6205,11
+6205,15
@@
static ir_op_ops *firm_set_default_hash(ir_opcode code, ir_op_ops *ops)
ops->hash = hash_##a; \
break
+ /* hash function already set */
+ if (ops->hash != NULL)
+ return ops;
+
switch (code) {
CASE(Const);
CASE(SymConst);
default:
- /* use input/mode default hash */
+ /* use input/mode default hash
if no function was given
*/
ops->hash = firm_default_hash;
}