Mercurial > projects > ldc
changeset 1218:7977096f0e49
Name some types.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Wed, 15 Apr 2009 21:37:01 +0200 |
parents | 00a84912c689 |
children | a0844cc67840 |
files | gen/nested.cpp gen/tollvm.cpp |
diffstat | 2 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/nested.cpp Wed Apr 15 20:59:21 2009 +0200 +++ b/gen/nested.cpp Wed Apr 15 21:37:01 2009 +0200 @@ -431,8 +431,8 @@ } } - // Append current frame type to frame type list const LLStructType* frameType = LLStructType::get(types); + gIR->module->addTypeName(std::string("nest.") + fd->toChars(), frameType); Logger::cout() << "frameType = " << *frameType << '\n';
--- a/gen/tollvm.cpp Wed Apr 15 20:59:21 2009 +0200 +++ b/gen/tollvm.cpp Wed Apr 15 21:37:01 2009 +0200 @@ -100,13 +100,17 @@ case Tarray: { t->irtype = new IrTypeArray(t); - return t->irtype->get(); + const LLType* arrty = t->irtype->get(); + gIR->module->addTypeName(t->toChars(), arrty); + return arrty; } case Tsarray: { t->irtype = new IrTypeSArray(t); - return t->irtype->get(); + const LLType* arrty = t->irtype->get(); + gIR->module->addTypeName(t->toChars(), arrty); + return arrty; } // aggregates @@ -232,7 +236,9 @@ const LLType* i8ptr = getVoidPtrType(); const LLType* func = DtoFunctionType(t->nextOf(), NULL, Type::tvoid->pointerTo()); const LLType* funcptr = getPtrToType(func); - return LLStructType::get(i8ptr, funcptr, NULL); + const LLStructType* dgtype = LLStructType::get(i8ptr, funcptr, NULL); + gIR->module->addTypeName(t->toChars(), dgtype); + return dgtype; } //////////////////////////////////////////////////////////////////////////////////////////