Skip to content

Commit 174cedd

Browse files
committed
Update to nightly-2025-08-11.
- `CoverageInfoBuilderMethods::init_coverage` was removed. - The `ret_ptr` argument was added to `BuilderMethods::atomic_rmw`, see rust-lang/rust#144192.
1 parent 296c182 commit 174cedd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

crates/rustc_codegen_nvvm/src/builder.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,8 @@ impl<'ll, 'tcx, 'a> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
519519
_size: Size,
520520
) -> &'ll Value {
521521
// Since for any A, A | 0 = A, and performing atomics on constant memory is UB in Rust, we can abuse or to perform atomic reads.
522-
self.atomic_rmw(AtomicRmwBinOp::AtomicOr, ptr, self.const_int(ty, 0), order)
522+
// njn: ?
523+
self.atomic_rmw(AtomicRmwBinOp::AtomicOr, ptr, self.const_int(ty, 0), order, /* ret_ptr */ true)
523524
}
524525

525526
fn load_operand(&mut self, place: PlaceRef<'tcx, &'ll Value>) -> OperandRef<'tcx, &'ll Value> {
@@ -752,7 +753,8 @@ impl<'ll, 'tcx, 'a> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
752753
_size: Size,
753754
) {
754755
// We can exchange *ptr with val, and then discard the result.
755-
self.atomic_rmw(AtomicRmwBinOp::AtomicXchg, ptr, val, order);
756+
// njn: ?
757+
self.atomic_rmw(AtomicRmwBinOp::AtomicXchg, ptr, val, order, /* ret_ptr */ true);
756758
}
757759

758760
fn gep(&mut self, ty: &'ll Type, ptr: &'ll Value, indices: &[&'ll Value]) -> &'ll Value {
@@ -1209,12 +1211,14 @@ impl<'ll, 'tcx, 'a> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
12091211
let success = self.extract_value(res, 1);
12101212
(val, success)
12111213
}
1214+
12121215
fn atomic_rmw(
12131216
&mut self,
12141217
op: AtomicRmwBinOp,
12151218
dst: &'ll Value,
12161219
src: &'ll Value,
12171220
order: AtomicOrdering,
1221+
_ret_ptr: bool, // njn: what to do?
12181222
) -> &'ll Value {
12191223
if matches!(op, AtomicRmwBinOp::AtomicNand) {
12201224
self.fatal("Atomic NAND not supported yet!")

crates/rustc_codegen_nvvm/src/context.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,10 +725,6 @@ impl<'tcx> FnAbiOfHelpers<'tcx> for CodegenCx<'_, 'tcx> {
725725
}
726726

727727
impl<'tcx> CoverageInfoBuilderMethods<'tcx> for CodegenCx<'_, 'tcx> {
728-
fn init_coverage(&mut self, _instance: Instance<'tcx>) {
729-
todo!()
730-
}
731-
732728
fn add_coverage(
733729
&mut self,
734730
_instance: Instance<'tcx>,

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-08-04"
2+
channel = "nightly-2025-08-11"
33
components = ["clippy", "llvm-tools-preview", "rust-src", "rustc-dev", "rustfmt", "rust-analyzer"]

0 commit comments

Comments
 (0)