# HG changeset patch # User Frits van Bommel # Date 1239824221 -7200 # Node ID 7977096f0e49c7fb8f21317457c4505267aa0158 # Parent 00a84912c689919ee7a4dd21f64d07aac58bf854 Name some types. diff -r 00a84912c689 -r 7977096f0e49 gen/nested.cpp --- 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'; diff -r 00a84912c689 -r 7977096f0e49 gen/tollvm.cpp --- 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; } //////////////////////////////////////////////////////////////////////////////////////////