From 050de43e17417e3293564bc75b0e6d8b6c4bb7b5 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 30 May 2008 19:15:08 +0000 Subject: [PATCH] - removed assertion() it is allowed to ask for non-existing arguments [r19866] --- ir/ana/analyze_irg_args.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ir/ana/analyze_irg_args.c b/ir/ana/analyze_irg_args.c index 51a7158d1..586a1cf86 100644 --- a/ir/ana/analyze_irg_args.c +++ b/ir/ana/analyze_irg_args.c @@ -474,15 +474,15 @@ static void analyze_method_params_weight(ir_entity *ent) { * higher optimization with procedure cloning. * * The values are calculation on demand only. + * + * @param ent the entity to analyze + * @param pos the argument number + * + * @return the parameter weight or null_weight if pos is greater + * than the number of arguments. */ unsigned get_method_param_weight(ir_entity *ent, int pos) { -#ifndef NDEBUG - ir_type *mtp = get_entity_type(ent); - int is_variadic = get_method_variadicity(mtp) == variadicity_variadic; - assert(0 <= pos && (is_variadic || pos < get_method_n_params(mtp))); -#endif - if (ent->attr.mtd_attr.param_weight) { if (pos < ARR_LEN(ent->attr.mtd_attr.param_weight)) return ent->attr.mtd_attr.param_weight[pos]; -- 2.20.1