@@ -20,7 +20,6 @@ use rustc::ty::layout::{
20
20
use rustc:: ty:: { self , Ty , TyCtxt , Instance } ;
21
21
use rustc:: util:: nodemap:: FxHashMap ;
22
22
use rustc_target:: spec:: { HasTargetSpec , Target } ;
23
- use rustc_codegen_ssa:: callee:: resolve_and_get_fn;
24
23
use rustc_codegen_ssa:: base:: wants_msvc_seh;
25
24
use crate :: callee:: get_fn;
26
25
@@ -362,7 +361,14 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
362
361
let tcx = self . tcx ;
363
362
let llfn = match tcx. lang_items ( ) . eh_personality ( ) {
364
363
Some ( def_id) if !wants_msvc_seh ( self . sess ( ) ) => {
365
- resolve_and_get_fn ( self , def_id, tcx. intern_substs ( & [ ] ) )
364
+ self . get_fn (
365
+ ty:: Instance :: resolve (
366
+ tcx,
367
+ ty:: ParamEnv :: reveal_all ( ) ,
368
+ def_id,
369
+ tcx. intern_substs ( & [ ] ) ,
370
+ ) . unwrap ( )
371
+ )
366
372
}
367
373
_ => {
368
374
let name = if wants_msvc_seh ( self . sess ( ) ) {
@@ -390,7 +396,14 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
390
396
let tcx = self . tcx ;
391
397
assert ! ( self . sess( ) . target. target. options. custom_unwind_resume) ;
392
398
if let Some ( def_id) = tcx. lang_items ( ) . eh_unwind_resume ( ) {
393
- let llfn = resolve_and_get_fn ( self , def_id, tcx. intern_substs ( & [ ] ) ) ;
399
+ let llfn = self . get_fn (
400
+ ty:: Instance :: resolve (
401
+ tcx,
402
+ ty:: ParamEnv :: reveal_all ( ) ,
403
+ def_id,
404
+ tcx. intern_substs ( & [ ] ) ,
405
+ ) . unwrap ( )
406
+ ) ;
394
407
unwresume. set ( Some ( llfn) ) ;
395
408
return llfn;
396
409
}
0 commit comments