@@ -66,9 +66,9 @@ impl FileHandler {
6666
6767impl < ' mir , ' tcx > EvalContextExtPrivate < ' mir , ' tcx > for crate :: MiriEvalContext < ' mir , ' tcx > { }
6868trait EvalContextExtPrivate < ' mir , ' tcx : ' mir > : crate :: MiriEvalContextExt < ' mir , ' tcx > {
69- /// Emulate `stat` or `lstat` on the `macos` platform . This function is not intended to be
69+ /// Emulate `stat` or `lstat` on `macos`. This function is not intended to be
7070 /// called directly from `emulate_foreign_item_by_name`, so it does not check if isolation is
71- /// disabled or if the target platform is the correct one. Please use `macos_stat` or
71+ /// disabled or if the target OS is the correct one. Please use `macos_stat` or
7272 /// `macos_lstat` instead.
7373 fn macos_stat_or_lstat (
7474 & mut self ,
@@ -114,7 +114,7 @@ trait EvalContextExtPrivate<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, '
114114 let blksize_t_layout = this. libc_ty_layout ( "blksize_t" ) ?;
115115 let uint32_t_layout = this. libc_ty_layout ( "uint32_t" ) ?;
116116
117- // We need to add 32 bits of padding after `st_rdev` if we are on a 64-bit platform .
117+ // We need to add 32 bits of padding after `st_rdev` if we are on a 64-bit target .
118118 let pad_layout = if this. tcx . sess . target . ptr_width == 64 {
119119 uint32_t_layout
120120 } else {
@@ -258,10 +258,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
258258 let o_wronly = this. eval_libc_i32 ( "O_WRONLY" ) ?;
259259 let o_rdwr = this. eval_libc_i32 ( "O_RDWR" ) ?;
260260 // The first two bits of the flag correspond to the access mode in linux, macOS and
261- // windows. We need to check that in fact the access mode flags for the current platform
262- // only use these two bits, otherwise we are in an unsupported platform and should error.
261+ // windows. We need to check that in fact the access mode flags for the current target
262+ // only use these two bits, otherwise we are in an unsupported target and should error.
263263 if ( o_rdonly | o_wronly | o_rdwr) & !0b11 != 0 {
264- throw_unsup_format ! ( "access mode flags on this platform are unsupported" ) ;
264+ throw_unsup_format ! ( "access mode flags on this target are unsupported" ) ;
265265 }
266266 let mut writable = true ;
267267
@@ -574,7 +574,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
574574 buf_op : OpTy < ' tcx , Tag > ,
575575 ) -> InterpResult < ' tcx , i32 > {
576576 let this = self . eval_context_mut ( ) ;
577- this. assert_platform ( "macos" , "stat" ) ;
577+ this. assert_target_os ( "macos" , "stat" ) ;
578578 this. check_no_isolation ( "stat" ) ?;
579579 // `stat` always follows symlinks.
580580 this. macos_stat_or_lstat ( true , path_op, buf_op)
@@ -587,7 +587,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
587587 buf_op : OpTy < ' tcx , Tag > ,
588588 ) -> InterpResult < ' tcx , i32 > {
589589 let this = self . eval_context_mut ( ) ;
590- this. assert_platform ( "macos" , "lstat" ) ;
590+ this. assert_target_os ( "macos" , "lstat" ) ;
591591 this. check_no_isolation ( "lstat" ) ?;
592592 this. macos_stat_or_lstat ( false , path_op, buf_op)
593593 }
@@ -599,7 +599,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
599599 ) -> InterpResult < ' tcx , i32 > {
600600 let this = self . eval_context_mut ( ) ;
601601
602- this. assert_platform ( "macos" , "fstat" ) ;
602+ this. assert_target_os ( "macos" , "fstat" ) ;
603603 this. check_no_isolation ( "fstat" ) ?;
604604
605605 let fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?;
@@ -621,7 +621,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
621621 ) -> InterpResult < ' tcx , i32 > {
622622 let this = self . eval_context_mut ( ) ;
623623
624- this. assert_platform ( "linux" , "statx" ) ;
624+ this. assert_target_os ( "linux" , "statx" ) ;
625625 this. check_no_isolation ( "statx" ) ?;
626626
627627 let statxbuf_scalar = this. read_scalar ( statxbuf_op) ?. not_undef ( ) ?;
@@ -685,7 +685,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
685685 // the `_mask_op` paramter specifies the file information that the caller requested.
686686 // However `statx` is allowed to return information that was not requested or to not
687687 // return information that was requested. This `mask` represents the information we can
688- // actually provide in any host platform .
688+ // actually provide for any target .
689689 let mut mask =
690690 this. eval_libc ( "STATX_TYPE" ) ?. to_u32 ( ) ? | this. eval_libc ( "STATX_SIZE" ) ?. to_u32 ( ) ?;
691691
@@ -880,7 +880,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
880880 ) -> InterpResult < ' tcx , i32 > {
881881 let this = self . eval_context_mut ( ) ;
882882
883- this. assert_platform ( "linux" , "readdir64_r" ) ;
883+ this. assert_target_os ( "linux" , "readdir64_r" ) ;
884884 this. check_no_isolation ( "readdir64_r" ) ?;
885885
886886 let dirp = this. read_scalar ( dirp_op) ?. to_machine_usize ( this) ?;
@@ -967,7 +967,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
967967 ) -> InterpResult < ' tcx , i32 > {
968968 let this = self . eval_context_mut ( ) ;
969969
970- this. assert_platform ( "macos" , "readdir_r" ) ;
970+ this. assert_target_os ( "macos" , "readdir_r" ) ;
971971 this. check_no_isolation ( "readdir_r" ) ?;
972972
973973 let dirp = this. read_scalar ( dirp_op) ?. to_machine_usize ( this) ?;
0 commit comments