diff options
Diffstat (limited to 'src/3p/chibicc')
| -rw-r--r-- | src/3p/chibicc/chibicc.h | 3 | ||||
| -rw-r--r-- | src/3p/chibicc/hashmap.c | 7 | 
2 files changed, 5 insertions, 5 deletions
diff --git a/src/3p/chibicc/chibicc.h b/src/3p/chibicc/chibicc.h index 2a80ecf..f3f87ab 100644 --- a/src/3p/chibicc/chibicc.h +++ b/src/3p/chibicc/chibicc.h @@ -117,9 +117,6 @@ static inline char *format(const char *fmt, ...) {    return ret;  } -#define unreachable() \ -  error("internal error at %s:%d", __FILE__, __LINE__) -  //  // type.c  // diff --git a/src/3p/chibicc/hashmap.c b/src/3p/chibicc/hashmap.c index 47110c6..2090274 100644 --- a/src/3p/chibicc/hashmap.c +++ b/src/3p/chibicc/hashmap.c @@ -2,6 +2,9 @@  #include "chibicc.h" +// mike: moved from chibicc.h and also renamed, to avoid conflicts with langext.h +#define chibi_unreachable() error("internal error at %s:%d", __FILE__, __LINE__) +  // Initial hash bucket size  #define INIT_SIZE 16 @@ -70,7 +73,7 @@ static HashEntry *get_entry(HashMap *map, char *key, int keylen) {      if (ent->key == NULL)        return NULL;    } -  unreachable(); +  chibi_unreachable();  }  static HashEntry *get_or_insert_entry(HashMap *map, char *key, int keylen) { @@ -102,7 +105,7 @@ static HashEntry *get_or_insert_entry(HashMap *map, char *key, int keylen) {        return ent;      }    } -  unreachable(); +  chibi_unreachable();  }  void *hashmap_get(HashMap *map, char *key) {  | 
