Fix bug in GBC expansion wrt invoke return types.
An invoke may return a value but that value is then unused. In this situation
mir_to_gbc will see there is no use and generate a call with a void result.
GBC expansion looks at return types to determine the result of a call, leading
to it converting void calls back to ones returning ints and causing assertion
failures in LLVM.
This change bases the return type of the expanded call on the type of the call
instruction it is expanding.
The change contains some other minor bits of LLVM codegen clean-up.
1 file changed