Commits

Roman Levenstein committed ec04b22145e
Properly propagate the calling convention into LLVM's call instructions. Each runtime function definition in RuntimeFunctions.def states which calling convention should be used for this runtime function. But IRGen and LLVMPasses were not always properly propagating this declared calling convention all the way down to llvm's Call instructions. In many cases, the standard C convention was set for the call irrespective of the actual calling convention defined for a given runtime function. As a result, incorrect code was generated. This commit tries to fix all those places, where such a mismatch was found. In many cases this is achieved by defining a helper function CreateCall in such a way that makes sure that the call instruction gets the same calling convention as the one used by its callee operand.