Skip to content

Commit

Permalink
Fix handling of StdCall intrinsic
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky committed Jul 4, 2018
1 parent 64b344c commit c948f6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit c948f6d

Please sign in to comment.