Cleaned up TypeInfo_Struct.

Fixed problem with DtoConstSize_t taking a size_t argument, this is not enough for cross compiling from 32bit host to a 64bit target. It now takes uint64_t. There's probably a lot of similar case around to code ...
This commit is contained in:
Tomas Lindquist Olsen 2009-05-17 04:41:10 +02:00
parent f3c7278e88
commit d80de9deb3
5 changed files with 90 additions and 154 deletions

View file

@ -80,6 +80,30 @@ void TypeInfoBuilder::push_void_array(llvm::Constant* CI, Type* valtype, Dsymbol
push_void_array(dim, G);
}
void TypeInfoBuilder::push_uint(unsigned u)
{
inits.push_back(DtoConstUint(u));
}
void TypeInfoBuilder::push_size(uint64_t s)
{
inits.push_back(DtoConstSize_t(s));
}
void TypeInfoBuilder::push_funcptr(FuncDeclaration* fd)
{
if (fd)
{
fd->codegen(Type::sir);
LLConstant* F = fd->ir.irFunc->func;
inits.push_back(F);
}
else
{
push_null_vp();
}
}
void TypeInfoBuilder::finalize(IrGlobal* tid)
{
// create the inititalizer