compiler: Replace rustc_target with abi in symbol_mangling

This commit is contained in:
Jubilee Young 2024-11-02 19:33:42 -07:00
parent 7639773e70
commit 5c953ee910
3 changed files with 3 additions and 6 deletions

View File

@ -4437,7 +4437,6 @@ dependencies = [
"rustc_middle", "rustc_middle",
"rustc_session", "rustc_session",
"rustc_span", "rustc_span",
"rustc_target",
"tracing", "tracing",
] ]

View File

@ -15,6 +15,5 @@ rustc_hir = { path = "../rustc_hir" }
rustc_middle = { path = "../rustc_middle" } rustc_middle = { path = "../rustc_middle" }
rustc_session = { path = "../rustc_session" } rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" } rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
tracing = "0.1" tracing = "0.1"
# tidy-alphabetical-end # tidy-alphabetical-end

View File

@ -2,7 +2,7 @@
use std::iter; use std::iter;
use std::ops::Range; use std::ops::Range;
use rustc_abi::Integer; use rustc_abi::{ExternAbi, Integer};
use rustc_data_structures::base_n::ToBaseN; use rustc_data_structures::base_n::ToBaseN;
use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::intern::Interned; use rustc_data_structures::intern::Interned;
@ -18,7 +18,6 @@
TyCtxt, TypeVisitable, TypeVisitableExt, UintTy, TyCtxt, TypeVisitable, TypeVisitableExt, UintTy,
}; };
use rustc_span::symbol::kw; use rustc_span::symbol::kw;
use rustc_target::spec::abi::Abi;
pub(super) fn mangle<'tcx>( pub(super) fn mangle<'tcx>(
tcx: TyCtxt<'tcx>, tcx: TyCtxt<'tcx>,
@ -444,8 +443,8 @@ fn print_type(&mut self, ty: Ty<'tcx>) -> Result<(), PrintError> {
cx.push("U"); cx.push("U");
} }
match sig.abi { match sig.abi {
Abi::Rust => {} ExternAbi::Rust => {}
Abi::C { unwind: false } => cx.push("KC"), ExternAbi::C { unwind: false } => cx.push("KC"),
abi => { abi => {
cx.push("K"); cx.push("K");
let name = abi.name(); let name = abi.name();