compiler: Add rustc_abi to _sanitizers

This commit is contained in:
Jubilee Young 2024-11-02 20:28:42 -07:00
parent 31cbde037b
commit ab6994f880
6 changed files with 7 additions and 6 deletions

View File

@ -4337,6 +4337,7 @@ name = "rustc_sanitizers"
version = "0.0.0"
dependencies = [
"bitflags 2.6.0",
"rustc_abi",
"rustc_data_structures",
"rustc_hir",
"rustc_middle",

View File

@ -7,6 +7,7 @@ edition = "2021"
bitflags = "2.5.0"
tracing = "0.1"
twox-hash = "1.6.3"
rustc_abi = { path = "../rustc_abi" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_hir = { path = "../rustc_hir" }
rustc_middle = { path = "../rustc_middle" }

View File

@ -7,6 +7,7 @@
use std::fmt::Write as _;
use rustc_abi::{ExternAbi, Integer};
use rustc_data_structures::base_n::{ALPHANUMERIC_ONLY, CASE_INSENSITIVE, ToBaseN};
use rustc_data_structures::fx::FxHashMap;
use rustc_hir as hir;
@ -18,8 +19,6 @@
};
use rustc_span::def_id::DefId;
use rustc_span::sym;
use rustc_target::abi::Integer;
use rustc_target::spec::abi::Abi;
use tracing::instrument;
use crate::cfi::typeid::TypeIdOptions;
@ -185,7 +184,7 @@ fn encode_fnsig<'tcx>(
let mut encode_ty_options = EncodeTyOptions::from_bits(options.bits())
.unwrap_or_else(|| bug!("encode_fnsig: invalid option(s) `{:?}`", options.bits()));
match fn_sig.abi {
Abi::C { .. } => {
ExternAbi::C { .. } => {
encode_ty_options.insert(EncodeTyOptions::GENERALIZE_REPR_C);
}
_ => {

View File

@ -7,7 +7,7 @@
use rustc_data_structures::fx::FxHashMap;
use rustc_middle::bug;
use rustc_middle::ty::{self, Instance, Ty, TyCtxt, TypeFoldable, TypeVisitableExt};
use rustc_target::abi::call::{Conv, FnAbi, PassMode};
use rustc_target::callconv::{Conv, FnAbi, PassMode};
use tracing::instrument;
mod encode;

View File

@ -6,7 +6,7 @@
use bitflags::bitflags;
use rustc_middle::ty::{Instance, Ty, TyCtxt};
use rustc_target::abi::call::FnAbi;
use rustc_target::callconv::FnAbi;
bitflags! {
/// Options for typeid_for_fnabi.

View File

@ -7,7 +7,7 @@
use std::hash::Hasher;
use rustc_middle::ty::{Instance, InstanceKind, ReifyReason, Ty, TyCtxt};
use rustc_target::abi::call::FnAbi;
use rustc_target::callconv::FnAbi;
use twox_hash::XxHash64;
pub use crate::cfi::typeid::{TypeIdOptions, itanium_cxx_abi};