mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 15:10:59 +03:00
[svn r350] Fixed incorrect function types for lazy arguments. looks like lazy arguments have never even worked :o well.. now they should.
This commit is contained in:
parent
521de1a47e
commit
8c48f86f0a
2 changed files with 24 additions and 0 deletions
|
@ -141,6 +141,17 @@ const llvm::FunctionType* DtoFunctionType(Type* type, const LLType* thistype, bo
|
|||
paramvec.push_back(at);
|
||||
}
|
||||
|
||||
// handle lazy args
|
||||
if (arg->storageClass & STClazy)
|
||||
{
|
||||
Logger::cout() << "for lazy got: " << *paramvec.back() << '\n';
|
||||
TypeFunction *ltf = new TypeFunction(NULL, arg->type, 0, LINKd);
|
||||
TypeDelegate *ltd = new TypeDelegate(ltf);
|
||||
at = getPtrToType(DtoType(ltd));
|
||||
Logger::cout() << "lazy updated to: " << *at << '\n';
|
||||
paramvec.back() = at;
|
||||
}
|
||||
|
||||
if (arg->llvmByVal)
|
||||
nbyval++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue