Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Fix handling of StdCall intrinsic #6051

Merged
merged 1 commit into from
Jul 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Common/src/TypeSystem/IL/ILProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private MethodIL CreateMethodIL(MethodDesc method)
if (((MetadataType)method.OwningType).HasCustomAttribute("System.Runtime.InteropServices", "McgIntrinsicsAttribute"))
{
var name = method.Name;
if (name == "Call" || name == "StdCall")
if (name == "Call" || name.StartsWith("StdCall"))
{
return CalliIntrinsic.EmitIL(method);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Common/src/TypeSystem/IL/Stubs/CalliIntrinsic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class CalliIntrinsic
{
public static MethodIL EmitIL(MethodDesc target)
{
Debug.Assert(target.Name == "Call" || target.Name == "StdCall");
Debug.Assert(target.Name == "Call" || target.Name.StartsWith("StdCall"));
Debug.Assert(target.Signature.Length > 0
&& target.Signature[0] == target.Context.GetWellKnownType(WellKnownType.IntPtr));

Expand Down