Skip to content

Commit

Permalink
Some cleanup around PInvokeStaticSigInfo (#52232)
Browse files Browse the repository at this point in the history
  • Loading branch information
elinor-fung authored May 5, 2021
1 parent d058930 commit a792d3e
Show file tree
Hide file tree
Showing 10 changed files with 176 additions and 152 deletions.
3 changes: 1 addition & 2 deletions src/coreclr/vm/binder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,8 +1038,7 @@ void CoreLibBinder::CheckExtended()
else
if (pMD->IsNDirect())
{
PInvokeStaticSigInfo sigInfo;
NDirect::PopulateNDirectMethodDesc((NDirectMethodDesc *)pMD, &sigInfo);
NDirect::PopulateNDirectMethodDesc((NDirectMethodDesc *)pMD);

if (pMD->IsQCall())
{
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/classcompat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3311,7 +3311,7 @@ HRESULT MethodTableBuilder::FindMethodDeclarationForMethodImpl(
IfFailRet(pMDInternalImport->GetNameAndSigOfMemberRef(tkMethod, &pSig, &cSig, &szMember));

if (isCallConv(
MetaSig::GetCallingConvention(NULL, Signature(pSig, cSig)),
MetaSig::GetCallingConvention(Signature(pSig, cSig)),
IMAGE_CEE_CS_CALLCONV_FIELD))
{
return VLDTR_E_MR_BADCALLINGCONV;
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5735,7 +5735,7 @@ void CEEPreloader::GenerateMethodStubs(
{
NDirectMethodDesc* pNMD = (NDirectMethodDesc*)pMD;
PInvokeStaticSigInfo sigInfo;
NDirect::PopulateNDirectMethodDesc(pNMD, &sigInfo);
NDirect::InitializeSigInfoAndPopulateNDirectMethodDesc(pNMD, &sigInfo);
pStubMD = NDirect::GetILStubMethodDesc((NDirectMethodDesc*)pMD, &sigInfo, dwNGenStubFlags);
}
#ifdef FEATURE_COMINTEROP
Expand Down
Loading

0 comments on commit a792d3e

Please sign in to comment.