*/
int tarval_is_finite(tarval *tv);
+/**
+ * Checks whether a pointer points to a tarval.
+ *
+ * @param thing an arbitrary pointer
+ *
+ * @return
+ * true if the thing is a tarval, else false
+ */
+int is_tarval(const void *thing);
+
#endif /* FIRM_TV_TV_H */
del_set(values); values = NULL;
}
+int (is_tarval)(const void *thing) {
+ return _is_tarval(thing);
+}
+
/****************************************************************************
* end of tv.c
****************************************************************************/
#define FIRM_TV_TV_T_H
#include "firm_config.h"
+#include "firm_common.h"
#include <assert.h>
#include "irmode.h"
return tarval_b_true;
}
+static INLINE int
+_is_tarval(const void *thing) {
+ return get_kind(thing) == k_tarval;
+}
+
#define get_tarval_mode(tv) _get_tarval_mode(tv)
#define get_tarval_bad() _get_tarval_bad()
#define get_tarval_undefined() _get_tarval_undefined()
#define get_tarval_b_false() _get_tarval_b_false()
#define get_tarval_b_true() _get_tarval_b_true()
#define get_tarval_P_void() _get_tarval_P_void()
+#define is_tarval(thing) _is_tarval(thing)
#endif /* FIRM_TV_TV_T_H */