@@ -66,9 +66,9 @@ impl FileHandler {
66
66
67
67
impl < ' mir , ' tcx > EvalContextExtPrivate < ' mir , ' tcx > for crate :: MiriEvalContext < ' mir , ' tcx > { }
68
68
trait 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
70
70
/// 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
72
72
/// `macos_lstat` instead.
73
73
fn macos_stat_or_lstat (
74
74
& mut self ,
@@ -114,7 +114,7 @@ trait EvalContextExtPrivate<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, '
114
114
let blksize_t_layout = this. libc_ty_layout ( "blksize_t" ) ?;
115
115
let uint32_t_layout = this. libc_ty_layout ( "uint32_t" ) ?;
116
116
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 .
118
118
let pad_layout = if this. tcx . sess . target . ptr_width == 64 {
119
119
uint32_t_layout
120
120
} else {
@@ -258,10 +258,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
258
258
let o_wronly = this. eval_libc_i32 ( "O_WRONLY" ) ?;
259
259
let o_rdwr = this. eval_libc_i32 ( "O_RDWR" ) ?;
260
260
// 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.
263
263
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" ) ;
265
265
}
266
266
let mut writable = true ;
267
267
@@ -574,7 +574,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
574
574
buf_op : OpTy < ' tcx , Tag > ,
575
575
) -> InterpResult < ' tcx , i32 > {
576
576
let this = self . eval_context_mut ( ) ;
577
- this. assert_platform ( "macos" , "stat" ) ;
577
+ this. assert_target_os ( "macos" , "stat" ) ;
578
578
this. check_no_isolation ( "stat" ) ?;
579
579
// `stat` always follows symlinks.
580
580
this. macos_stat_or_lstat ( true , path_op, buf_op)
@@ -587,7 +587,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
587
587
buf_op : OpTy < ' tcx , Tag > ,
588
588
) -> InterpResult < ' tcx , i32 > {
589
589
let this = self . eval_context_mut ( ) ;
590
- this. assert_platform ( "macos" , "lstat" ) ;
590
+ this. assert_target_os ( "macos" , "lstat" ) ;
591
591
this. check_no_isolation ( "lstat" ) ?;
592
592
this. macos_stat_or_lstat ( false , path_op, buf_op)
593
593
}
@@ -599,7 +599,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
599
599
) -> InterpResult < ' tcx , i32 > {
600
600
let this = self . eval_context_mut ( ) ;
601
601
602
- this. assert_platform ( "macos" , "fstat" ) ;
602
+ this. assert_target_os ( "macos" , "fstat" ) ;
603
603
this. check_no_isolation ( "fstat" ) ?;
604
604
605
605
let fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?;
@@ -621,7 +621,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
621
621
) -> InterpResult < ' tcx , i32 > {
622
622
let this = self . eval_context_mut ( ) ;
623
623
624
- this. assert_platform ( "linux" , "statx" ) ;
624
+ this. assert_target_os ( "linux" , "statx" ) ;
625
625
this. check_no_isolation ( "statx" ) ?;
626
626
627
627
let statxbuf_scalar = this. read_scalar ( statxbuf_op) ?. not_undef ( ) ?;
@@ -685,7 +685,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
685
685
// the `_mask_op` paramter specifies the file information that the caller requested.
686
686
// However `statx` is allowed to return information that was not requested or to not
687
687
// 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 .
689
689
let mut mask =
690
690
this. eval_libc ( "STATX_TYPE" ) ?. to_u32 ( ) ? | this. eval_libc ( "STATX_SIZE" ) ?. to_u32 ( ) ?;
691
691
@@ -880,7 +880,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
880
880
) -> InterpResult < ' tcx , i32 > {
881
881
let this = self . eval_context_mut ( ) ;
882
882
883
- this. assert_platform ( "linux" , "readdir64_r" ) ;
883
+ this. assert_target_os ( "linux" , "readdir64_r" ) ;
884
884
this. check_no_isolation ( "readdir64_r" ) ?;
885
885
886
886
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
967
967
) -> InterpResult < ' tcx , i32 > {
968
968
let this = self . eval_context_mut ( ) ;
969
969
970
- this. assert_platform ( "macos" , "readdir_r" ) ;
970
+ this. assert_target_os ( "macos" , "readdir_r" ) ;
971
971
this. check_no_isolation ( "readdir_r" ) ?;
972
972
973
973
let dirp = this. read_scalar ( dirp_op) ?. to_machine_usize ( this) ?;
0 commit comments