diff --git a/src/coreclr/vm/ceeload.cpp b/src/coreclr/vm/ceeload.cpp index e05302f536706..5e3b27daf6d45 100644 --- a/src/coreclr/vm/ceeload.cpp +++ b/src/coreclr/vm/ceeload.cpp @@ -3402,24 +3402,6 @@ MethodDesc *Module::FindMethod(mdToken pMethod) RETURN pMDRet; } -// -// GetPropertyInfoForMethodDef wraps the metadata function of the same name. -// - -HRESULT Module::GetPropertyInfoForMethodDef(mdMethodDef md, mdProperty *ppd, LPCSTR *pName, ULONG *pSemantic) -{ - CONTRACTL - { - INSTANCE_CHECK; - NOTHROW; - GC_NOTRIGGER; - MODE_ANY; - } - CONTRACTL_END; - - return GetMDImport()->GetPropertyInfoForMethodDef(md, ppd, pName, pSemantic); -} - // Return true if this module has any live (jitted) JMC functions. // If a module has no jitted JMC functions, then it's as if it's a // non-user module. diff --git a/src/coreclr/vm/ceeload.h b/src/coreclr/vm/ceeload.h index 3ad7b37a76a3d..1b487dd9fa871 100644 --- a/src/coreclr/vm/ceeload.h +++ b/src/coreclr/vm/ceeload.h @@ -1324,8 +1324,6 @@ class Module : public ModuleBase MethodDesc *FindMethodThrowing(mdToken pMethod); MethodDesc *FindMethod(mdToken pMethod); - HRESULT GetPropertyInfoForMethodDef(mdMethodDef md, mdProperty *ppd, LPCSTR *pName, ULONG *pSemantic); - public: // Debugger stuff diff --git a/src/coreclr/vm/clrtocomcall.cpp b/src/coreclr/vm/clrtocomcall.cpp index c604a6c8a9011..d47445f8f64fd 100644 --- a/src/coreclr/vm/clrtocomcall.cpp +++ b/src/coreclr/vm/clrtocomcall.cpp @@ -505,7 +505,7 @@ UINT32 CLRToCOMLateBoundWorker( ULONG uSemantic; // See if there is property information for this member. - hr = pItfMT->GetModule()->GetPropertyInfoForMethodDef(pItfMD->GetMemberDef(), &propToken, &strMemberName, &uSemantic); + hr = pItfMT->GetMDImport()->GetPropertyInfoForMethodDef(pItfMD->GetMemberDef(), &propToken, &strMemberName, &uSemantic); if (hr != S_OK) { // Non-property method diff --git a/src/coreclr/vm/commtmemberinfomap.cpp b/src/coreclr/vm/commtmemberinfomap.cpp index 8bc185e9d81a4..7b2626a24c763 100644 --- a/src/coreclr/vm/commtmemberinfomap.cpp +++ b/src/coreclr/vm/commtmemberinfomap.cpp @@ -689,7 +689,7 @@ void ComMTMemberInfoMap::GetMethodPropsForMeth( rProps[ix].bFunction2Getter = FALSE; // See if there is property information for this member. - hr = pMeth->GetModule()->GetPropertyInfoForMethodDef(pMeth->GetMemberDef(), &pd, &pPropName, &uSemantic); + hr = pMeth->GetMDImport()->GetPropertyInfoForMethodDef(pMeth->GetMemberDef(), &pd, &pPropName, &uSemantic); IfFailThrow(hr); if (hr == S_OK) diff --git a/src/coreclr/vm/dispatchinfo.cpp b/src/coreclr/vm/dispatchinfo.cpp index eb0c83f7a6ce5..8b769c71bcc05 100644 --- a/src/coreclr/vm/dispatchinfo.cpp +++ b/src/coreclr/vm/dispatchinfo.cpp @@ -2578,10 +2578,9 @@ bool DispatchInfo::IsPropertyAccessorVisible(bool fIsSetter, OBJECTREF* pMemberI // Check to see if the new method is a property accessor. mdToken tkMember = mdTokenNil; - MethodTable *pDeclaringMT = pMDForProperty->GetMethodTable(); - if (pMDForProperty->GetModule()->GetPropertyInfoForMethodDef(pMDForProperty->GetMemberDef(), &tkMember, NULL, NULL) == S_OK) + if (pMDForProperty->GetMDImport()->GetPropertyInfoForMethodDef(pMDForProperty->GetMemberDef(), &tkMember, NULL, NULL) == S_OK) { - if (IsMemberVisibleFromCom(pDeclaringMT, tkMember, pMDForProperty->GetMemberDef())) + if (IsMemberVisibleFromCom(pMDForProperty->GetMethodTable(), tkMember, pMDForProperty->GetMemberDef())) return true; } } diff --git a/src/coreclr/vm/interoputil.cpp b/src/coreclr/vm/interoputil.cpp index d9e5d43759626..7a91cd41f7c14 100644 --- a/src/coreclr/vm/interoputil.cpp +++ b/src/coreclr/vm/interoputil.cpp @@ -2558,7 +2558,7 @@ BOOL IsMethodVisibleFromCom(MethodDesc *pMD) mdMethodDef md = pMD->GetMemberDef(); // See if there is property information for this member. - hr = pMD->GetModule()->GetPropertyInfoForMethodDef(md, &pd, &pPropName, &uSemantic); + hr = pMD->GetMDImport()->GetPropertyInfoForMethodDef(md, &pd, &pPropName, &uSemantic); IfFailThrow(hr); if (hr == S_OK)