From 2904c619c1b883a29c2b7ea29210b44ee8f298f0 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 5 Dec 2012 19:43:27 +0900 Subject: [PATCH] Don't bother creating an alias for a def of the same type. --- tools/qfcc/source/def.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qfcc/source/def.c b/tools/qfcc/source/def.c index 7e94314bf..e6825374a 100644 --- a/tools/qfcc/source/def.c +++ b/tools/qfcc/source/def.c @@ -165,6 +165,8 @@ alias_def (def_t *def, type_t *type, int offset) internal_error (0, "aliasing a def to a larger type"); if (offset < 0 || offset + type_size (type) > type_size (def->type)) internal_error (0, "invalid alias offset"); + if (type == def->type) + return def; for (alias = def->alias_defs; alias; alias = alias->next) { if (alias->type == type && alias->offset == offset) return alias;