Skip to content

Commit 296c182

Browse files
nnethercoteLegNeato
authored andcommitted
Update to nightly-2025-08-04.
- `rustc_attr_data_structures` was moved to `rustc_hir::attrs`. - `BuilderMethods::tail_call` was added. It's currently `todo!()`. - `tcx.get_attrs_unchecked(...)` was replaced with `tcx.get_all_attrs(...)`. - `TyCtxt::impl_of_method` was renamed `TyCtxt::impl_of_assoc`. - `WriteBackendMethods::run_link` was removed as part of the removal of `-Zcombine-cgu`. - Need to update `target_feature_base_cc.stderr` for another innocuous looking DWARF `.loc` entry change.
1 parent 2e763da commit 296c182

File tree

8 files changed

+19
-20
lines changed

8 files changed

+19
-20
lines changed

crates/rustc_codegen_nvvm/src/attributes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::llvm::{self, AttributePlace::*, Value};
22
use rustc_ast::{LitKind, MetaItemInner, MetaItemLit};
3-
use rustc_attr_data_structures::{InlineAttr, OptimizeAttr};
43
use rustc_hir::Attribute;
4+
use rustc_hir::attrs::{InlineAttr, OptimizeAttr};
55
use rustc_middle::{middle::codegen_fn_attrs::CodegenFnAttrFlags, ty};
66
use rustc_session::{Session, config::OptLevel};
77
use rustc_span::{Symbol, sym};

crates/rustc_codegen_nvvm/src/builder.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,19 @@ impl<'ll, 'tcx, 'a> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
13401340
call
13411341
}
13421342

1343+
fn tail_call(
1344+
&mut self,
1345+
_llty: Self::Type,
1346+
_fn_attrs: Option<&CodegenFnAttrs>,
1347+
_fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
1348+
_llfn: Self::Value,
1349+
_args: &[Self::Value],
1350+
_funclet: Option<&Self::Funclet>,
1351+
_instance: Option<ty::Instance<'tcx>>,
1352+
) {
1353+
todo!()
1354+
}
1355+
13431356
fn zext(&mut self, val: &'ll Value, dest_ty: &'ll Type) -> &'ll Value {
13441357
trace!("Zext {:?} to {:?}", val, dest_ty);
13451358
unsafe { llvm::LLVMBuildZExt(self.llbuilder, val, dest_ty, unnamed()) }

crates/rustc_codegen_nvvm/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
260260
pub fn static_addrspace(&self, instance: Instance<'tcx>) -> AddressSpace {
261261
let ty = instance.ty(self.tcx, self.typing_env());
262262
let is_mutable = self.tcx().is_mutable_static(instance.def_id());
263-
let attrs = self.tcx.get_attrs_unchecked(instance.def_id()); // TODO: replace with get_attrs
263+
let attrs = self.tcx.get_all_attrs(instance.def_id()); // TODO: replace with get_attrs
264264
let nvvm_attrs = NvvmAttributes::parse(self, attrs);
265265

266266
if let Some(addr) = nvvm_attrs.addrspace {

crates/rustc_codegen_nvvm/src/debug_info/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
402402
// First, let's see if this is a method within an inherent impl. Because
403403
// if yes, we want to make the result subroutine DIE a child of the
404404
// subroutine's self-type.
405-
if let Some(impl_def_id) = cx.tcx.impl_of_method(instance.def_id()) {
405+
if let Some(impl_def_id) = cx.tcx.impl_of_assoc(instance.def_id()) {
406406
// If the method does *not* belong to a trait, proceed
407407
if cx.tcx.trait_id_of_impl(impl_def_id).is_none() {
408408
let impl_self_ty = cx.tcx.instantiate_and_normalize_erasing_regions(

crates/rustc_codegen_nvvm/src/lib.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
extern crate rustc_abi;
99
extern crate rustc_arena;
1010
extern crate rustc_ast;
11-
extern crate rustc_attr_data_structures;
1211
extern crate rustc_attr_parsing;
1312
extern crate rustc_codegen_ssa;
1413
extern crate rustc_data_structures;
@@ -263,19 +262,6 @@ impl WriteBackendMethods for NvvmCodegenBackend {
263262
type ThinData = ();
264263
type ThinBuffer = ThinBuffer;
265264

266-
fn run_link(
267-
_cgcx: &CodegenContext<Self>,
268-
_diag_handler: DiagCtxtHandle<'_>,
269-
_modules: Vec<ModuleCodegen<Self::Module>>,
270-
) -> Result<ModuleCodegen<Self::Module>, FatalError> {
271-
// TODO(Rdambrosio016):
272-
// we can probably call the llvm codegen to do this, but cgcx
273-
// is a codegen context of NvvmCodegenBackend not LlvmCodegenBackend
274-
// and to make a new cgcx we need to make a new LlvmCodegenBackend which
275-
// cannot be done through the API currently
276-
todo!();
277-
}
278-
279265
fn run_and_optimize_fat_lto(
280266
_cgcx: &CodegenContext<Self>,
281267
_exported_symbols_for_lto: &[String],

crates/rustc_codegen_nvvm/src/mono_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl<'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
9090
attributes::from_fn_attrs(self, lldecl, instance);
9191

9292
let def_id = instance.def_id();
93-
let attrs = self.tcx.get_attrs_unchecked(def_id); // TODO: Replace with get_attrs
93+
let attrs = self.tcx.get_all_attrs(def_id); // TODO: Replace with get_attrs
9494
let nvvm_attrs = NvvmAttributes::parse(self, attrs);
9595

9696
unsafe {

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2025-07-28"
2+
channel = "nightly-2025-08-04"
33
components = ["clippy", "llvm-tools-preview", "rust-src", "rustc-dev", "rustfmt", "rust-analyzer"]

tests/compiletests/ui/dis/target_feature_base_cc.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $L__tmp1:
1717
.loc 1 38 5
1818
bra.uni $L__tmp2;
1919
$L__tmp2:
20-
.loc 2 2198 9
20+
.loc 2 2200 9
2121
mov.u32 %r1, 1124204544;
2222
st.volatile.global.u32 [%rd2], %r1;
2323
$L__tmp3:

0 commit comments

Comments
 (0)