From f2dbe1007739463fc343210e6b28a50661a15ea5 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 28 May 2010 15:09:07 +0000 Subject: [PATCH] add missing get_type_for_mode functions [r27604] --- ir/ir/irmode.c | 5 +++++ ir/ir/irmode_t.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ir/ir/irmode.c b/ir/ir/irmode.c index bce2fb359..786a20de9 100644 --- a/ir/ir/irmode.c +++ b/ir/ir/irmode.c @@ -960,6 +960,11 @@ int is_reinterpret_cast(const ir_mode *src, const ir_mode *dst) return ma == irma_twos_complement || ma == irma_ones_complement; } +ir_type *(get_type_for_mode) (const ir_mode *mode) +{ + return get_type_for_mode_(mode); +} + void finish_mode(void) { obstack_free(&modes, 0); diff --git a/ir/ir/irmode_t.h b/ir/ir/irmode_t.h index e0712cc71..38634ee19 100644 --- a/ir/ir/irmode_t.h +++ b/ir/ir/irmode_t.h @@ -150,6 +150,11 @@ static inline int _mode_is_int_vector(const ir_mode *mode) return (_get_mode_sort(mode) == irms_int_number) && (_get_mode_vector_elems(mode) > 1); } +static inline ir_type *get_type_for_mode_(const ir_mode *mode) +{ + return mode->type; +} + /** mode module initialization, call once before use of any other function **/ void init_mode(void); @@ -178,5 +183,6 @@ void finish_mode(void); #define mode_is_dataM(mode) _mode_is_dataM(mode) #define mode_is_float_vector(mode) _mode_is_float_vector(mode) #define mode_is_int_vector(mode) _mode_is_int_vector(mode) +#define get_type_for_mode(mode) get_type_for_mode_(mode) #endif -- 2.20.1