public ProcedureConstant ResolveToImportedProcedureConstant(Statement stm, Constant c)
{
var addrInstruction = program.SegmentMap.MapLinearAddressToAddress(stm.LinearAddress);
var addrImportThunk = program.Platform.MakeAddressFromConstant(c);
ImportReference impref;
if (!program.ImportReferences.TryGetValue(addrImportThunk, out impref))
return null;
var extProc = impref.ResolveImportedProcedure(
this,
program.Platform,
new AddressContext(program, addrInstruction, this.eventListener));
return new ProcedureConstant(program.Platform.PointerType, extProc);
}