From 3fa9bbd90c003e7fc29442fcb0d10440a2457df0 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 20 Dec 2007 06:19:13 +0000 Subject: [PATCH] Really avoid constructing two struct types for the same struct in FIRM. [r18811] --- ast2firm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ast2firm.c b/ast2firm.c index 1b9cf5c..27e502f 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -556,7 +556,8 @@ static ir_type *create_struct_type(compound_type_t *type) dbg_info *dbgi = get_dbg_info(&type->type.source_position); ir_type *irtype = new_d_type_struct(id, dbgi); - type->type.firm_type = irtype; + declaration->v.irtype = irtype; + type->type.firm_type = irtype; size_t align_all = 1; size_t offset = 0; @@ -646,8 +647,6 @@ static ir_type *create_struct_type(compound_type_t *type) set_type_size_bytes(irtype, offset); set_type_state(irtype, layout_fixed); - declaration->v.irtype = irtype; - return irtype; } -- 2.20.1