Name some types.

This commit is contained in:
Frits van Bommel 2009-04-15 21:37:01 +02:00
parent 8c3cc1467f
commit 1ef9941daf
2 changed files with 10 additions and 4 deletions

View file

@ -431,8 +431,8 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
}
}
// 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';

View file

@ -100,13 +100,17 @@ const LLType* DtoType(Type* t)
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 LLStructType* DtoDelegateType(Type* t)
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;
}
//////////////////////////////////////////////////////////////////////////////////////////