From: Christoph Mallon Date: Sat, 5 May 2012 15:58:05 +0000 (+0200) Subject: Do not refetch a value, which we already have. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=4fca120bc34225fb4c15b85849caffd54836ee07;p=libfirm Do not refetch a value, which we already have. --- diff --git a/ir/be/begnuas.c b/ir/be/begnuas.c index 02d98cd00..c6c0063b1 100644 --- a/ir/be/begnuas.c +++ b/ir/be/begnuas.c @@ -502,9 +502,9 @@ static void emit_weak(const ir_entity *entity) static void emit_visibility(const ir_entity *entity) { - ir_linkage linkage = get_entity_linkage(entity); + ir_linkage const linkage = get_entity_linkage(entity); - if (get_entity_linkage(entity) & IR_LINKAGE_WEAK) { + if (linkage & IR_LINKAGE_WEAK) { emit_weak(entity); /* Note: .weak seems to imply .globl so no need to output .globl */ } else if (get_entity_visibility(entity) == ir_visibility_external