Skip to content

Commit 527ba9b

Browse files
committed
Restructure std::sys::personality
Move `dwarf` into `gcc`, since it's only needed there and will need to make GCC-specific assumptions in the next commit.
1 parent f464759 commit 527ba9b

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

library/std/src/sys/personality/gcc.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@
3737
//! and the last personality routine transfers control to the catch block.
3838
#![forbid(unsafe_op_in_unsafe_fn)]
3939

40+
mod dwarf;
41+
mod eh;
42+
4043
use unwind as uw;
4144

42-
use super::dwarf::eh::{self, EHAction, EHContext};
45+
use self::eh::{EHAction, EHContext};
4346
use crate::ffi::c_int;
4447

4548
// Register ids were lifted from LLVM's TargetLowering::getExceptionPointerRegister()

library/std/src/sys/personality/dwarf/mod.rs renamed to library/std/src/sys/personality/gcc/dwarf.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#[cfg(test)]
1111
mod tests;
1212

13-
pub mod eh;
14-
1513
pub struct DwarfReader {
1614
pub ptr: *const u8,
1715
}

library/std/src/sys/personality/dwarf/eh.rs renamed to library/std/src/sys/personality/gcc/eh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use core::ptr;
1616

17-
use super::DwarfReader;
17+
use super::dwarf::DwarfReader;
1818

1919
pub const DW_EH_PE_omit: u8 = 0xFF;
2020
pub const DW_EH_PE_absptr: u8 = 0x00;

library/std/src/sys/personality/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
//! Additionally, ARM EHABI uses the personality function when generating
1111
//! backtraces.
1212
13-
mod dwarf;
14-
1513
#[cfg(not(any(test, doctest)))]
1614
cfg_select! {
1715
target_os = "emscripten" => {

0 commit comments

Comments
 (0)