Skip to content

Commit ab6994f

Browse files
compiler: Add rustc_abi to _sanitizers
1 parent 31cbde0 commit ab6994f

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -4337,6 +4337,7 @@ name = "rustc_sanitizers"
43374337
version = "0.0.0"
43384338
dependencies = [
43394339
"bitflags 2.6.0",
4340+
"rustc_abi",
43404341
"rustc_data_structures",
43414342
"rustc_hir",
43424343
"rustc_middle",

compiler/rustc_sanitizers/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2021"
77
bitflags = "2.5.0"
88
tracing = "0.1"
99
twox-hash = "1.6.3"
10+
rustc_abi = { path = "../rustc_abi" }
1011
rustc_data_structures = { path = "../rustc_data_structures" }
1112
rustc_hir = { path = "../rustc_hir" }
1213
rustc_middle = { path = "../rustc_middle" }

compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
88
use std::fmt::Write as _;
99

10+
use rustc_abi::{ExternAbi, Integer};
1011
use rustc_data_structures::base_n::{ALPHANUMERIC_ONLY, CASE_INSENSITIVE, ToBaseN};
1112
use rustc_data_structures::fx::FxHashMap;
1213
use rustc_hir as hir;
@@ -18,8 +19,6 @@ use rustc_middle::ty::{
1819
};
1920
use rustc_span::def_id::DefId;
2021
use rustc_span::sym;
21-
use rustc_target::abi::Integer;
22-
use rustc_target::spec::abi::Abi;
2322
use tracing::instrument;
2423

2524
use crate::cfi::typeid::TypeIdOptions;
@@ -185,7 +184,7 @@ fn encode_fnsig<'tcx>(
185184
let mut encode_ty_options = EncodeTyOptions::from_bits(options.bits())
186185
.unwrap_or_else(|| bug!("encode_fnsig: invalid option(s) `{:?}`", options.bits()));
187186
match fn_sig.abi {
188-
Abi::C { .. } => {
187+
ExternAbi::C { .. } => {
189188
encode_ty_options.insert(EncodeTyOptions::GENERALIZE_REPR_C);
190189
}
191190
_ => {

compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use rustc_data_structures::fx::FxHashMap;
88
use rustc_middle::bug;
99
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable, TypeVisitableExt};
10-
use rustc_target::abi::call::{Conv, FnAbi, PassMode};
10+
use rustc_target::callconv::{Conv, FnAbi, PassMode};
1111
use tracing::instrument;
1212

1313
mod encode;

compiler/rustc_sanitizers/src/cfi/typeid/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
use bitflags::bitflags;
88
use rustc_middle::ty::{Instance, Ty, TyCtxt};
9-
use rustc_target::abi::call::FnAbi;
9+
use rustc_target::callconv::FnAbi;
1010

1111
bitflags! {
1212
/// Options for typeid_for_fnabi.

compiler/rustc_sanitizers/src/kcfi/typeid/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use std::hash::Hasher;
88

99
use rustc_middle::ty::{Instance, InstanceKind, ReifyReason, Ty, TyCtxt};
10-
use rustc_target::abi::call::FnAbi;
10+
use rustc_target::callconv::FnAbi;
1111
use twox_hash::XxHash64;
1212

1313
pub use crate::cfi::typeid::{TypeIdOptions, itanium_cxx_abi};

0 commit comments

Comments
 (0)