winebuild: Output relay thunks for stub functions when the arguments are known.

This commit is contained in:
Alexandre Julliard 2011-05-03 13:09:09 +02:00
parent 2e6f48b730
commit 631fb9b652
1 changed files with 12 additions and 1 deletions

View File

@ -53,7 +53,18 @@ static inline int needs_relay( const ORDDEF *odp )
/* skip nonexistent entry points */
if (!odp) return 0;
/* skip non-functions */
if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL && odp->type != TYPE_THISCALL) return 0;
switch (odp->type)
{
case TYPE_STDCALL:
case TYPE_CDECL:
case TYPE_THISCALL:
break;
case TYPE_STUB:
if (odp->u.func.nb_args != -1) break;
/* fall through */
default:
return 0;
}
/* skip norelay and forward entry points */
if (odp->flags & (FLAG_NORELAY|FLAG_FORWARD)) return 0;
/* skip register entry points on x86_64 */