X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fadt%2Farray.c;h=6f9618482bee0a1960ac0e16b622862570b2e634;hb=d0d85962ef52c14950db90e5981a7bea36023ab3;hp=1402432f0a7d31c3202f3c7b9c8c876607cfc9fb;hpb=1ba00901371680626dc22ab9658bc7339d2dd9ab;p=libfirm diff --git a/ir/adt/array.c b/ir/adt/array.c index 1402432f0..6f9618482 100644 --- a/ir/adt/array.c +++ b/ir/adt/array.c @@ -181,3 +181,25 @@ _arr_resize (void *elts, int nelts, size_t eltsize) return dp->v.elts; } + +#ifdef DEBUG_libfirm +/** + * This function returns the length of a flexible array. + * Do NOT use is in code, use ARR_LEN() macro! + * This function is intended to be called from a debugger. + */ +int array_len(void *arr) { + return ARR_LEN(arr); +} + +/** + * This function returns the array descriptor of a flexible array. + * Do NOT use is in code!. + * This function is intended to be called from a debugger. + */ +_arr_descr *array_descr(void *arr) { + if (! arr) + return NULL; + return _ARR_DESCR(arr); +} +#endif /* DEBUG_libfirm */