@@ -20,7 +20,6 @@ use rustc::ty::layout::{
2020use rustc:: ty:: { self , Ty , TyCtxt , Instance } ;
2121use rustc:: util:: nodemap:: FxHashMap ;
2222use rustc_target:: spec:: { HasTargetSpec , Target } ;
23- use rustc_codegen_ssa:: callee:: resolve_and_get_fn;
2423use rustc_codegen_ssa:: base:: wants_msvc_seh;
2524use crate :: callee:: get_fn;
2625
@@ -362,7 +361,14 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
362361 let tcx = self . tcx ;
363362 let llfn = match tcx. lang_items ( ) . eh_personality ( ) {
364363 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+ )
366372 }
367373 _ => {
368374 let name = if wants_msvc_seh ( self . sess ( ) ) {
@@ -390,7 +396,14 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
390396 let tcx = self . tcx ;
391397 assert ! ( self . sess( ) . target. target. options. custom_unwind_resume) ;
392398 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+ ) ;
394407 unwresume. set ( Some ( llfn) ) ;
395408 return llfn;
396409 }
0 commit comments