mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 07:30:43 +03:00
Merge remote-tracking branch 'origin/master' into merge-2.064
Conflicts: gen/arrays.cpp
This commit is contained in:
commit
c231ae0ad0
5 changed files with 76 additions and 69 deletions
|
@ -52,6 +52,9 @@ llvm::FunctionType* DtoFunctionType(Type* type, IrFuncTy &irFty, Type* thistype,
|
|||
assert(f->next && "Encountered function type with invalid return type; "
|
||||
"trying to codegen function ignored by the frontend?");
|
||||
|
||||
// Return cached type if available
|
||||
if (irFty.funcType) return irFty.funcType;
|
||||
|
||||
TargetABI* abi = (f->linkage == LINKintrinsic ? TargetABI::getIntrinsic() : gABI);
|
||||
// Tell the ABI we're resolving a new function type
|
||||
abi->newFunctionType(f);
|
||||
|
@ -285,11 +288,11 @@ llvm::FunctionType* DtoFunctionType(Type* type, IrFuncTy &irFty, Type* thistype,
|
|||
std::reverse(argtypes.begin() + beg, argtypes.end());
|
||||
}
|
||||
|
||||
LLFunctionType* functype = LLFunctionType::get(irFty.ret->ltype, argtypes, irFty.c_vararg);
|
||||
irFty.funcType = LLFunctionType::get(irFty.ret->ltype, argtypes, irFty.c_vararg);
|
||||
|
||||
Logger::cout() << "Final function type: " << *functype << "\n";
|
||||
Logger::cout() << "Final function type: " << *irFty.funcType << "\n";
|
||||
|
||||
return functype;
|
||||
return irFty.funcType;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue