This change correctly sets the attributes on the callsites
generated in thunks. This makes sure things such as sret, sext, etc.
are correctly set, so that the call can be a proper tailcall.
Also, the transfer of attributes in the replaceDirectCallers function
appears to be unnecessary, but until this is confirmed it will remain.
This comment is a bit confusing as-is because it's not clear what 'This' refers to. Presumably it's the paragraph below; should this paragraph go after the first one instead?