From fdc172377eaae6f20d12aaa1af20a6b153a52f40 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Mon, 27 Oct 2008 01:11:41 +0100 Subject: [PATCH] Fixed tuple fields, thanx downs --- dmd/declaration.h | 3 +++ gen/toobj.cpp | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/dmd/declaration.h b/dmd/declaration.h index 6079d8c4..fbd0186d 100644 --- a/dmd/declaration.h +++ b/dmd/declaration.h @@ -157,6 +157,9 @@ struct TupleDeclaration : Declaration int needThis(); TupleDeclaration *isTupleDeclaration() { return this; } + + // LDC we need this + void toObjFile(int multiobj); // compile to .obj file }; /**************************************************************/ diff --git a/gen/toobj.cpp b/gen/toobj.cpp index 89a21bef..928c3e35 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -911,6 +911,24 @@ unsigned ClassDeclaration::baseVtblOffset(BaseClass *bc) /* ================================================================== */ +void TupleDeclaration::toObjFile(int multiobj) +{ + Logger::println("TupleDeclaration::toObjFile(): %s", toChars()); + + assert(isexp); + assert(objects); + + int n = objects->dim; + + for (int i=0; i < n; ++i) + { + DsymbolExp* exp = (DsymbolExp*)objects->data[i]; + exp->s->toObjFile(multiobj); + } +} + +/* ================================================================== */ + void VarDeclaration::toObjFile(int multiobj) { Logger::print("VarDeclaration::toObjFile(): %s | %s\n", toChars(), type->toChars());