Mercurial > projects > ldc
diff gen/toir.cpp @ 122:36ab367572df trunk
[svn r126] String switch is now implemented.
A few other fixes.
author | lindquist |
---|---|
date | Tue, 27 Nov 2007 09:19:07 +0100 |
parents | 9c79b61fb638 |
children | 7f9a0a58394b |
line wrap: on
line diff
--- a/gen/toir.cpp Tue Nov 27 03:09:36 2007 +0100 +++ b/gen/toir.cpp Tue Nov 27 09:19:07 2007 +0100 @@ -92,11 +92,18 @@ Logger::println("AliasDeclaration - no work"); // do nothing } + // enum else if (EnumDeclaration* e = declaration->isEnumDeclaration()) { Logger::println("EnumDeclaration - no work"); // do nothing } + // class + else if (ClassDeclaration* e = declaration->isClassDeclaration()) + { + Logger::println("ClassDeclaration"); + DtoForceConstInitDsymbol(e); + } // unsupported declaration else { @@ -364,7 +371,7 @@ Type* dtype = DtoDType(type); Type* cty = DtoDType(dtype->next); - const llvm::Type* ct = DtoType(dtype->next); + const llvm::Type* ct = DtoType(cty); //printf("ct = %s\n", type->next->toChars()); const llvm::ArrayType* at = llvm::ArrayType::get(ct,len+1);