Store front-end D function type in IrFuncTy

As we do for IrFuncTyArg. We'll need access to the front-end linkage for
the Posix ABIs too in order to implement indirect-by-value passing of
non-PODs for `extern(C++)`.
This commit is contained in:
Martin Kinkelin 2018-05-29 21:32:58 +02:00
parent c01dfc3db8
commit 92913d4c08
16 changed files with 51 additions and 38 deletions

View file

@ -77,7 +77,7 @@ llvm::FunctionType *DtoFunctionType(Type *type, IrFuncTy &irFty, Type *thistype,
// Do not modify irFty yet; this function may be called recursively if any
// of the argument types refer to this type.
IrFuncTy newIrFty;
IrFuncTy newIrFty(f);
// The index of the next argument on the LLVM level.
unsigned nextLLArgIdx = 0;
@ -188,7 +188,7 @@ llvm::FunctionType *DtoFunctionType(Type *type, IrFuncTy &irFty, Type *thistype,
}
// let the ABI rewrite the types as necessary
abi->rewriteFunctionType(f, newIrFty);
abi->rewriteFunctionType(newIrFty);
// Now we can modify irFty safely.
irFty = std::move(newIrFty);