2 use rustc_target::spec::abi::Abi;
5 use helpers::check_abi;
7 #[derive(Debug, Copy, Clone)]
12 // Returns an error for unsupported symbols, and None if this symbol
13 // should become a NULL pointer (pretend it does not exist).
14 pub fn from_str(name: &str) -> InterpResult<'static, Option<Dlsym>> {
16 "GetSystemTimePreciseAsFileTime" => None,
17 _ => throw_unsup_format!("unsupported Windows dlsym: {}", name),
22 impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mir, 'tcx> {}
23 pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx> {
28 _args: &[OpTy<'tcx, Tag>],
29 ret: Option<(&PlaceTy<'tcx, Tag>, mir::BasicBlock)>,
30 ) -> InterpResult<'tcx> {
31 let this = self.eval_context_mut();
32 let (_dest, _ret) = ret.expect("we don't support any diverging dlsym");
33 assert!(this.tcx.sess.target.os == "windows");
35 check_abi(abi, Abi::System)?;