This moves some memptr specific code into the generic thunk emission
codepath.
Fixes PR20053.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D4613
llvm-svn: 214004
This allows us to perfectly forward non-trivial arguments that use
inalloca.
We still can't forward non-trivial arguments through thunks when we have
a covariant return type with a non-trivial adjustment. This would
require emitting an extra copy, which is non-conforming anyway.
llvm-svn: 208927