First try to add aliasing support in ilp coalescer
[libfirm] / ir / libcore / lc_opts.c
index 3c33724..db1cb68 100644 (file)
@@ -28,6 +28,7 @@
 #include "lc_opts_enum.h"
 #include "hashptr.h"
 #include "lc_printf.h"
+#include "util.h"
 #include "xmalloc.h"
 #include "obst.h"
 
@@ -43,7 +44,7 @@ static struct obstack obst;
 static void set_name(lc_opt_entry_t *ent, const char *name)
 {
        ent->name = name;
-       ent->hash = HASH_STR(name, strlen(name));
+       ent->hash = hash_str(name);
 }
 
 #define entry_matches(ent,hash_val,str) \
@@ -233,7 +234,7 @@ static lc_opt_entry_t *lc_opt_find_ent(const struct list_head *head, const char
 {
        lc_opt_entry_t *ent, *found = NULL;
        int error = error_to_use;
-       unsigned hash = HASH_STR(name, strlen(name));
+       unsigned hash = hash_str(name);
 
        if (!list_empty(head)) {
                list_for_each_entry(lc_opt_entry_t, ent, head, list) {
@@ -504,7 +505,7 @@ int lc_opt_occurs(lc_opt_entry_t *opt, const char *value, lc_opt_err_info_t *err
                case lc_opt_type_bit:
                case lc_opt_type_negbit:
                                strtolower(buf, sizeof(buf), value);
-                               for (i = 0; i < LC_ARRSIZE(bool_strings); ++i) {
+                               for (i = 0; i < ARRAY_SIZE(bool_strings); ++i) {
                                        if (strcmp(buf, bool_strings[i].str) == 0) {
                                                val->integer = bool_strings[i].val;
                                                error = lc_opt_err_none;