Change location of assign to irFty.

If the comment about this function is still right (can be called recursively) then the assignment
to irFty should be done after all functions are called.
Takes advantage of move assignment, too.
This commit is contained in:
Kai Nacke 2014-01-03 12:57:53 +01:00
parent 535221e16d
commit 551bce6d18
2 changed files with 8 additions and 4 deletions

View file

@ -256,15 +256,15 @@ llvm::FunctionType* DtoFunctionType(Type* type, IrFuncTy &irFty, Type* thistype,
lidx++;
}
// Now we can modify irFty safely.
irFty = newIrFty;
// let the abi rewrite the types as necesary
abi->rewriteFunctionType(f, irFty);
abi->rewriteFunctionType(f, newIrFty);
// Tell the ABI we're done with this function type
abi->doneWithFunctionType();
// Now we can modify irFty safely.
irFty = llvm_move(newIrFty);
// build the function type
std::vector<LLType*> argtypes;
argtypes.reserve(lidx);