Skip to content

Commit 0b87a43

Browse files
committed
Attempt to fix rust_eh_unwind_resume
1 parent 1528d78 commit 0b87a43

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustc_codegen_llvm/context.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::abi::FnAbi;
1+
use crate::abi::{FnAbi, FnAbiLlvmExt};
22
use crate::attributes;
33
use crate::debuginfo;
44
use crate::llvm;
@@ -431,9 +431,8 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
431431
));
432432

433433
let fn_abi = FnAbi::of_fn_ptr(self, sig, &[]);
434-
let llfn = self.declare_fn("rust_eh_unwind_resume", &fn_abi);
435-
attributes::apply_target_cpu_attr(self, llfn);
436-
let static_ptr = self.static_addr_of(llfn, tcx.data_layout.pointer_align.abi, None);
434+
let fn_ptr = fn_abi.ptr_to_llvm_type(self);
435+
let static_ptr = self.declare_global("rust_eh_unwind_resume", &fn_ptr);
437436
unwresume.set(Some(static_ptr));
438437
static_ptr
439438
}

0 commit comments

Comments
 (0)