Skip to content

Commit

Permalink
fix(llvm-backend) Mark some variables as unused.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Mar 29, 2019
1 parent 5cd45cb commit 34b4f2f
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/llvm-backend/src/platform/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,22 @@ pub unsafe fn install_signal_handler() {
SaFlags::SA_ONSTACK | SaFlags::SA_SIGINFO,
SigSet::empty(),
);
// sigaction(SIGFPE, &sa).unwrap();
// sigaction(SIGILL, &sa).unwrap();
sigaction(SIGSEGV, &sa).unwrap();
sigaction(SIGBUS, &sa).unwrap();
}

#[cfg_attr(nightly, unwind(allowed))]
extern "C" fn signal_trap_handler(
signum: ::nix::libc::c_int,
siginfo: *mut siginfo_t,
ucontext: *mut c_void,
_signum: ::nix::libc::c_int,
_siginfo: *mut siginfo_t,
_ucontext: *mut c_void,
) {
unsafe {
/// Apparently, we can unwind from arbitary instructions, as long
/// as we don't need to catch the exception inside the function that
/// was interrupted.
///
/// This works on macos, not sure about linux.
// Apparently, we can unwind from arbitary instructions, as long
// as we don't need to catch the exception inside the function that
// was interrupted.
//
// This works on macos, not sure about linux.
throw_trap(2);
}
}

0 comments on commit 34b4f2f

Please sign in to comment.