summaryrefslogtreecommitdiff
path: root/src/vm/callingconvention.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/callingconvention.h')
-rw-r--r--src/vm/callingconvention.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vm/callingconvention.h b/src/vm/callingconvention.h
index c9a27c2371..cde2ba465a 100644
--- a/src/vm/callingconvention.h
+++ b/src/vm/callingconvention.h
@@ -1701,6 +1701,17 @@ inline BOOL HasRetBuffArg(MetaSig * pSig)
return argit.HasRetBuffArg();
}
+#ifdef UNIX_X86_ABI
+// For UNIX_X86_ABI and unmanaged function, we always need RetBuf if the return type is VALUETYPE
+inline BOOL HasRetBuffArgUnmanagedFixup(MetaSig * pSig)
+{
+ WRAPPER_NO_CONTRACT;
+ // We cannot just pSig->GetReturnType() here since it will return ELEMENT_TYPE_VALUETYPE for enums
+ CorElementType type = pSig->GetRetTypeHandleThrowing().GetVerifierCorElementType();
+ return type == ELEMENT_TYPE_VALUETYPE;
+}
+#endif
+
inline BOOL IsRetBuffPassedAsFirstArg()
{
WRAPPER_NO_CONTRACT;