diff gen/toobj.cpp @ 737:041c1596d217

Removed warnings on ignored aligns. Only do aligment on packed structs, align(1) struct Packed { ... } Changed the way struct/class fields are added, first small part of cleaning up these... Make struct/class/union fields aware of any anonymous struct/union they might be part of, not yet really useful, but part of getting better union support.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 28 Oct 2008 15:41:09 +0100
parents eee9efe5b51f
children dc8b8b7ea0c1
line wrap: on
line diff
--- a/gen/toobj.cpp	Mon Oct 27 17:42:38 2008 +0100
+++ b/gen/toobj.cpp	Tue Oct 28 15:41:09 2008 +0100
@@ -991,19 +991,10 @@
         else
             gIR->constInitList.push_back(this);
     }
-
-    // inside aggregate declaration. declare a field.
     else
     {
-        Logger::println("Aggregate var declaration: '%s' offset=%d", toChars(), offset);
-
-        const LLType* _type = DtoType(type);
-        this->ir.irField = new IrField(this);
-
-        // add the field in the IRStruct
-        gIR->topstruct()->offsets.insert(std::make_pair(offset, IrStruct::Offset(this, _type)));
+        assert(ir.irField != 0);
     }
-
     Logger::println("VarDeclaration::toObjFile is done");
 }