| use rustc_span::Symbol; |
| use rustc_target::spec::abi::Abi; |
| |
| use crate::*; |
| use shims::foreign_items::EmulateForeignItemResult; |
| |
| impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriInterpCx<'mir, 'tcx> {} |
| |
| pub fn is_dyn_sym(_name: &str) -> bool { |
| false |
| } |
| |
| pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { |
| #[allow(unused, clippy::match_single_binding)] // there isn't anything here yet |
| fn emulate_foreign_item_inner( |
| &mut self, |
| link_name: Symbol, |
| abi: Abi, |
| args: &[OpTy<'tcx, Provenance>], |
| dest: &PlaceTy<'tcx, Provenance>, |
| ) -> InterpResult<'tcx, EmulateForeignItemResult> { |
| let this = self.eval_context_mut(); |
| |
| match link_name.as_str() { |
| _ => return Ok(EmulateForeignItemResult::NotSupported), |
| } |
| |
| Ok(EmulateForeignItemResult::NeedsJumping) |
| } |
| } |