mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 07:30:43 +03:00
Name some types.
This commit is contained in:
parent
8c3cc1467f
commit
1ef9941daf
2 changed files with 10 additions and 4 deletions
|
@ -431,8 +431,8 @@ void DtoCreateNestedContext(FuncDeclaration* fd) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append current frame type to frame type list
|
|
||||||
const LLStructType* frameType = LLStructType::get(types);
|
const LLStructType* frameType = LLStructType::get(types);
|
||||||
|
gIR->module->addTypeName(std::string("nest.") + fd->toChars(), frameType);
|
||||||
|
|
||||||
Logger::cout() << "frameType = " << *frameType << '\n';
|
Logger::cout() << "frameType = " << *frameType << '\n';
|
||||||
|
|
||||||
|
|
|
@ -100,13 +100,17 @@ const LLType* DtoType(Type* t)
|
||||||
case Tarray:
|
case Tarray:
|
||||||
{
|
{
|
||||||
t->irtype = new IrTypeArray(t);
|
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:
|
case Tsarray:
|
||||||
{
|
{
|
||||||
t->irtype = new IrTypeSArray(t);
|
t->irtype = new IrTypeSArray(t);
|
||||||
return t->irtype->get();
|
const LLType* arrty = t->irtype->get();
|
||||||
|
gIR->module->addTypeName(t->toChars(), arrty);
|
||||||
|
return arrty;
|
||||||
}
|
}
|
||||||
|
|
||||||
// aggregates
|
// aggregates
|
||||||
|
@ -232,7 +236,9 @@ const LLStructType* DtoDelegateType(Type* t)
|
||||||
const LLType* i8ptr = getVoidPtrType();
|
const LLType* i8ptr = getVoidPtrType();
|
||||||
const LLType* func = DtoFunctionType(t->nextOf(), NULL, Type::tvoid->pointerTo());
|
const LLType* func = DtoFunctionType(t->nextOf(), NULL, Type::tvoid->pointerTo());
|
||||||
const LLType* funcptr = getPtrToType(func);
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue