Rename to

This commit is contained in:
Aaron Hill 2019-11-06 13:20:08 -05:00
parent ee2dc4b728
commit 2ed1e89706
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
2 changed files with 4 additions and 3 deletions

View File

@ -337,7 +337,7 @@ fn find_fn(
// Some functions we support even if they are non-const -- but avoid testing
// that for const fn! We certainly do *not* want to actually call the fn
// though, so be sure we return here.
return if ecx.hook_fn(instance, args, dest)? {
return if ecx.hook_panic_fn(instance, args, dest)? {
ecx.goto_block(ret)?; // fully evaluated and done
Ok(None)
} else {

View File

@ -354,9 +354,10 @@ pub fn emulate_intrinsic(
Ok(true)
}
/// "Intercept" a function call because we have something special to do for it.
/// "Intercept" a function call to a panic-related function
/// because we have something special to do for it.
/// Returns `true` if an intercept happened.
pub fn hook_fn(
pub fn hook_panic_fn(
&mut self,
instance: ty::Instance<'tcx>,
args: &[OpTy<'tcx, M::PointerTag>],