Do not refetch a value, which we already have.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sat, 5 May 2012 15:58:05 +0000 (17:58 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 6 May 2012 06:02:53 +0000 (08:02 +0200)
ir/be/begnuas.c

index 02d98cd..c6c0063 100644 (file)
@@ -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