mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03:00
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:
parent
f3c7278e88
commit
d80de9deb3
5 changed files with 90 additions and 154 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue