Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/22.1-2026-05-19
branch = rustc/23.1-2026-07-22
shallow = true
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
Expand Down
24 changes: 14 additions & 10 deletions compiler/rustc_codegen_cranelift/src/abi/mod.rs
Comment thread
nikic marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,19 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
) -> Cow<'_, [Value]> {
// FIXME any way to reuse the abi adjustment code in rustc_target?

// Pass i128 arguments by-ref on Windows.
// Pass and return f128 indirectly on s390x and x86_64 Windows.
let indirect_f128 = self.tcx.sess.target.arch == Arch::S390x
|| (self.tcx.sess.target.is_like_windows && self.tcx.sess.target.arch == Arch::X86_64);

// Pass i128 arguments by-ref on s390x and Windows.
let (params, args): (Vec<_>, Cow<'_, [_]>) =
if self.tcx.sess.target.is_like_windows || self.tcx.sess.target.arch == Arch::S390x {
let (params, args): (Vec<_>, Vec<_>) = params
.into_iter()
.zip(args)
.map(|(param, &arg)| {
if param.value_type == types::I128
|| (self.tcx.sess.target.arch == Arch::S390x
&& param.value_type == types::F128)
|| (indirect_f128 && param.value_type == types::F128)
{
let arg_ptr = self.create_stack_slot(16, 16);
arg_ptr.store(self, arg, MemFlagsData::trusted());
Expand All @@ -166,19 +169,20 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
(params, args.into())
};

if self.tcx.sess.target.is_like_windows
&& matches!(*returns, [AbiParam { value_type: types::I128, .. }])
{
let ret_single_i128 = matches!(*returns, [AbiParam { value_type: types::I128, .. }]);
let ret_single_f128 = matches!(*returns, [AbiParam { value_type: types::F128, .. }]);
if ret_single_i128 && self.tcx.sess.target.is_like_windows {
// Return i128 using the vector ABI on Windows
returns[0].value_type = types::I64X2;

let ret = self.lib_call_unadjusted(name, params, returns, &args)[0];

Cow::Owned(vec![codegen_bitcast(self, types::I128, ret)])
} else if self.tcx.sess.target.arch == Arch::S390x
&& matches!(*returns, [AbiParam { value_type: types::I128 | types::F128, .. }])
} else if (ret_single_i128 && self.tcx.sess.target.arch == Arch::S390x)
|| (ret_single_f128 && indirect_f128)
{
// Return i128 and f128 using a return area pointer on s390x.
// Return x86_64 Windows f128 and s390x i128 indirectly (sret in LLVM terminology).
let ret_ty = returns[0].value_type;
let mut params = params;
let mut args = args.to_vec();

Expand All @@ -188,7 +192,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {

self.lib_call_unadjusted(name, params, vec![], &args);

Cow::Owned(vec![ret_ptr.load(self, types::I128, MemFlagsData::trusted())])
Cow::Owned(vec![ret_ptr.load(self, ret_ty, MemFlagsData::trusted())])
} else {
Cow::Borrowed(self.lib_call_unadjusted(name, params, returns, &args))
}
Expand Down
8 changes: 2 additions & 6 deletions compiler/rustc_target/src/callconv/x86_win64.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rustc_abi::{BackendRepr, Float, Integer, Primitive, Size, TyAbiInterface};
use rustc_abi::{BackendRepr, Integer, Primitive, Size, TyAbiInterface};

use crate::callconv::{ArgAbi, FnAbi, Reg};
use crate::spec::{HasTargetSpec, RustcAbi};
Expand Down Expand Up @@ -35,11 +35,7 @@ where
// FIXME(#134288): This may change for the `-msvc` targets in the future.
a.cast_to(Reg::opaque_vector(Size::from_bits(128)));
}
} else if a.layout.size.bytes() > 8
&& !matches!(scalar.primitive(), Primitive::Float(Float::F128))
{
// Match what LLVM does for `f128` so that `compiler-builtins` builtins match up
// with what LLVM expects.
} else if a.layout.size.bytes() > 8 {
a.make_indirect();
} else {
a.extend_integer_width_to(32);
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,7 @@ fn copy_src_dirs(

static LLVM_PROJECTS: &[&str] = &[
"llvm-project/clang",
"llvm-project/libc",
"llvm-project/libunwind",
"llvm-project/lld",
"llvm-project/lldb",
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ impl Step for Llvm {
// equally well everywhere.
if builder.llvm_link_shared() {
cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
// Keep the pre-LLVM23 behavior for now.
cfg.define("LLVM_VERSIONED_DYLIB_NAME_ON_DARWIN", "OFF");
}

if (target.starts_with("csky")
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/scripts/build-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -ex
source shared.sh

# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh
LLVM=llvmorg-22.1.0-rc2
LLVM=llvmorg-23.1.0-rc1

mkdir llvm-project
cd llvm-project
Expand Down
2 changes: 2 additions & 0 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -742,9 +742,11 @@ auto:

- name: dist-i686-mingw
env:
# Disable RISCV target because building it OOMs.
RUST_CONFIGURE_ARGS: >-
--build=i686-pc-windows-gnu
--enable-full-tools
--set llvm.targets=AArch64;AMDGPU;ARM;BPF;Hexagon;LoongArch;MSP430;Mips;NVPTX;PowerPC;Sparc;SystemZ;WebAssembly;X86
SCRIPT: python x.py dist bootstrap --include-default-paths
DIST_REQUIRE_ALL_TOOLS: 1
CODEGEN_BACKENDS: llvm,cranelift
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-project
13 changes: 4 additions & 9 deletions tests/assembly-llvm/x86_64-windows-float-abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
//@ compile-flags: --target x86_64-pc-windows-msvc
//@ needs-llvm-components: x86
//@ add-minicore
//@ revisions: LLVM22 LLVM23
//@ [LLVM22] max-llvm-major-version: 22
//@ [LLVM23] min-llvm-version: 23

#![feature(f16, f128)]
#![feature(no_core)]
Expand Down Expand Up @@ -40,12 +37,10 @@ pub extern "C" fn second_f64(_: f64, x: f64) -> f64 {
}

// CHECK-LABEL: second_f128
// LLVM22: movaps (%rdx), %xmm0
// LLVM22-NEXT: retq
// LLVM23: movq %rcx, %rax
// LLVM23-NEXT: movaps (%r8), %xmm0
// LLVM23-NEXT: movaps %xmm0, (%rcx)
// LLVM23-NEXT: retq
// CHECK: movq %rcx, %rax
// CHECK-NEXT: movaps (%r8), %xmm0
// CHECK-NEXT: movaps %xmm0, (%rcx)
// CHECK-NEXT: retq
#[no_mangle]
pub extern "C" fn second_f128(_: f128, x: f128) -> f128 {
x
Expand Down
8 changes: 4 additions & 4 deletions tests/coverage/async.cov-map
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Number of file 0 mappings: 1
Highest counter ID seen: c0

Function name: async::i::{closure#0}
Raw bytes (75): 0x[01, 01, 03, 05, 09, 11, 15, 0d, 11, 0d, 01, 2c, 13, 00, 14, 01, 04, 0b, 00, 0c, 09, 01, 09, 00, 0a, 01, 00, 0e, 00, 0f, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 02, 00, 0e, 00, 17, 11, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 06, 01, 0e, 00, 10, 0b, 02, 01, 00, 02]
Raw bytes (75): 0x[01, 01, 03, 05, 09, 11, 15, 0d, 11, 0d, 01, 2c, 13, 00, 14, 01, 04, 0b, 00, 0c, 09, 01, 09, 00, 0a, 01, 00, 0e, 00, 18, 01, 00, 0e, 00, 0f, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 02, 00, 0e, 00, 17, 11, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 06, 01, 0e, 00, 10, 0b, 02, 01, 00, 02]
Number of files: 1
- file 0 => $DIR/async.rs
Number of expressions: 3
Expand All @@ -177,8 +177,8 @@ Number of file 0 mappings: 13
- Code(Counter(0)) at (prev + 44, 19) to (start + 0, 20)
- Code(Counter(0)) at (prev + 4, 11) to (start + 0, 12)
- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10)
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15)
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 24)
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15)
- Code(Counter(1)) at (prev + 0, 28) to (start + 0, 33)
- Code(Counter(2)) at (prev + 0, 39) to (start + 0, 48)
- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 10)
Expand All @@ -193,7 +193,7 @@ Number of file 0 mappings: 13
Highest counter ID seen: c5

Function name: async::j
Raw bytes (65): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0b, 01, 37, 01, 00, 0c, 01, 0b, 0b, 00, 0c, 05, 01, 09, 00, 0a, 01, 00, 0e, 00, 0f, 01, 00, 0e, 00, 1b, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 02, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 06, 01, 0e, 00, 10, 01, 02, 01, 00, 02]
Raw bytes (65): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0b, 01, 37, 01, 00, 0c, 01, 0b, 0b, 00, 0c, 05, 01, 09, 00, 0a, 01, 00, 0e, 00, 1b, 01, 00, 0e, 00, 0f, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 02, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 06, 01, 0e, 00, 10, 01, 02, 01, 00, 02]
Number of files: 1
- file 0 => $DIR/async.rs
Number of expressions: 3
Expand All @@ -204,8 +204,8 @@ Number of file 0 mappings: 11
- Code(Counter(0)) at (prev + 55, 1) to (start + 0, 12)
- Code(Counter(0)) at (prev + 11, 11) to (start + 0, 12)
- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 10)
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15)
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 27)
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15)
- Code(Counter(1)) at (prev + 0, 31) to (start + 0, 39)
- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10)
- Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 26)
Expand Down
2 changes: 1 addition & 1 deletion tests/coverage/async.coverage
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
LL| |#![rustfmt::skip]
LL| |//@ edition: 2018
LL| |//@ compile-flags: -Copt-level=1
LL| |
LL| |//@ min-llvm-version: 23
LL| |//@ aux-build: executor.rs
LL| |extern crate executor;
LL| |
Expand Down
2 changes: 1 addition & 1 deletion tests/coverage/async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#![rustfmt::skip]
//@ edition: 2018
//@ compile-flags: -Copt-level=1

//@ min-llvm-version: 23
//@ aux-build: executor.rs
extern crate executor;

Expand Down
16 changes: 8 additions & 8 deletions tests/coverage/coroutine.cov-map
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Function name: coroutine::get_u32
Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 0b, 01, 00, 2d, 01, 01, 08, 00, 0b, 05, 01, 09, 00, 0e, 02, 02, 09, 00, 28, 01, 02, 01, 00, 02]
Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 0c, 01, 00, 2d, 01, 01, 08, 00, 0b, 05, 01, 09, 00, 0e, 02, 02, 09, 00, 28, 01, 02, 01, 00, 02]
Number of files: 1
- file 0 => $DIR/coroutine.rs
Number of expressions: 1
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
Number of file 0 mappings: 5
- Code(Counter(0)) at (prev + 11, 1) to (start + 0, 45)
- Code(Counter(0)) at (prev + 12, 1) to (start + 0, 45)
- Code(Counter(0)) at (prev + 1, 8) to (start + 0, 11)
- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 14)
- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 40)
Expand All @@ -14,14 +14,14 @@ Number of file 0 mappings: 5
Highest counter ID seen: c1

Function name: coroutine::main
Raw bytes (93): 0x[01, 01, 02, 01, 05, 05, 09, 11, 01, 13, 01, 00, 0a, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 13, 01, 00, 14, 00, 22, 01, 00, 24, 00, 2a, 01, 00, 2b, 00, 2d, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 13, 05, 00, 0b, 00, 2e, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 02, 01, 00, 02]
Raw bytes (93): 0x[01, 01, 02, 01, 05, 05, 09, 11, 01, 14, 01, 00, 0a, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 13, 01, 00, 14, 00, 22, 01, 00, 24, 00, 2a, 01, 00, 2b, 00, 2d, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 05, 00, 0b, 00, 13, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 02, 01, 00, 02]
Number of files: 1
- file 0 => $DIR/coroutine.rs
Number of expressions: 2
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
Number of file 0 mappings: 17
- Code(Counter(0)) at (prev + 19, 1) to (start + 0, 10)
- Code(Counter(0)) at (prev + 20, 1) to (start + 0, 10)
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16)
- Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46)
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22)
Expand All @@ -32,8 +32,8 @@ Number of file 0 mappings: 17
- Code(Counter(1)) at (prev + 1, 43) to (start + 0, 45)
- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 20)
= (c0 - c1)
- Code(Counter(1)) at (prev + 2, 11) to (start + 0, 19)
- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 46)
- Code(Counter(1)) at (prev + 2, 11) to (start + 0, 46)
- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 19)
- Code(Counter(1)) at (prev + 0, 20) to (start + 0, 34)
- Code(Counter(3)) at (prev + 1, 34) to (start + 0, 39)
- Code(Counter(2)) at (prev + 0, 44) to (start + 0, 46)
Expand All @@ -43,12 +43,12 @@ Number of file 0 mappings: 17
Highest counter ID seen: c3

Function name: coroutine::main::{closure#0}
Raw bytes (24): 0x[01, 01, 00, 04, 01, 16, 08, 00, 09, 01, 01, 09, 00, 1f, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06]
Raw bytes (24): 0x[01, 01, 00, 04, 01, 17, 08, 00, 09, 01, 01, 09, 00, 1f, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06]
Number of files: 1
- file 0 => $DIR/coroutine.rs
Number of expressions: 0
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 22, 8) to (start + 0, 9)
- Code(Counter(0)) at (prev + 23, 8) to (start + 0, 9)
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 31)
- Code(Counter(1)) at (prev + 1, 16) to (start + 0, 21)
- Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6)
Expand Down
1 change: 1 addition & 0 deletions tests/coverage/coroutine.coverage
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
LL| |//@ min-llvm-version: 23
LL| |#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
LL| |
LL| |use std::ops::{Coroutine, CoroutineState};
Expand Down
1 change: 1 addition & 0 deletions tests/coverage/coroutine.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ min-llvm-version: 23
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]

use std::ops::{Coroutine, CoroutineState};
Expand Down
28 changes: 14 additions & 14 deletions tests/coverage/yield.cov-map
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Function name: yield::main
Raw bytes (139): 0x[01, 01, 05, 01, 05, 05, 09, 09, 11, 11, 15, 11, 15, 19, 01, 07, 01, 00, 0a, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 13, 01, 00, 0b, 00, 2e, 01, 00, 14, 00, 22, 05, 01, 27, 00, 29, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 13, 05, 00, 0b, 00, 2e, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 03, 09, 00, 16, 09, 08, 0b, 00, 13, 09, 00, 0b, 00, 2e, 09, 00, 14, 00, 22, 11, 01, 27, 00, 29, 0a, 01, 0e, 00, 14, 11, 02, 0b, 00, 13, 11, 00, 0b, 00, 2e, 11, 00, 14, 00, 22, 12, 01, 27, 00, 29, 15, 01, 0e, 00, 14, 12, 02, 01, 00, 02]
Raw bytes (139): 0x[01, 01, 05, 01, 05, 05, 09, 09, 11, 11, 15, 11, 15, 19, 01, 08, 01, 00, 0a, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 2e, 01, 00, 0b, 00, 13, 01, 00, 14, 00, 22, 05, 01, 27, 00, 29, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 05, 00, 0b, 00, 13, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 03, 09, 00, 16, 09, 08, 0b, 00, 2e, 09, 00, 0b, 00, 13, 09, 00, 14, 00, 22, 11, 01, 27, 00, 29, 0a, 01, 0e, 00, 14, 11, 02, 0b, 00, 2e, 11, 00, 0b, 00, 13, 11, 00, 14, 00, 22, 12, 01, 27, 00, 29, 15, 01, 0e, 00, 14, 12, 02, 01, 00, 02]
Number of files: 1
- file 0 => $DIR/yield.rs
Number of expressions: 5
Expand All @@ -9,30 +9,30 @@ Number of expressions: 5
- expression 3 operands: lhs = Counter(4), rhs = Counter(5)
- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
Number of file 0 mappings: 25
- Code(Counter(0)) at (prev + 7, 1) to (start + 0, 10)
- Code(Counter(0)) at (prev + 8, 1) to (start + 0, 10)
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22)
- Code(Counter(0)) at (prev + 6, 11) to (start + 0, 19)
- Code(Counter(0)) at (prev + 0, 11) to (start + 0, 46)
- Code(Counter(0)) at (prev + 6, 11) to (start + 0, 46)
- Code(Counter(0)) at (prev + 0, 11) to (start + 0, 19)
- Code(Counter(0)) at (prev + 0, 20) to (start + 0, 34)
- Code(Counter(1)) at (prev + 1, 39) to (start + 0, 41)
- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 20)
= (c0 - c1)
- Code(Counter(1)) at (prev + 2, 11) to (start + 0, 19)
- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 46)
- Code(Counter(1)) at (prev + 2, 11) to (start + 0, 46)
- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 19)
- Code(Counter(1)) at (prev + 0, 20) to (start + 0, 34)
- Code(Counter(3)) at (prev + 1, 34) to (start + 0, 39)
- Code(Counter(2)) at (prev + 0, 44) to (start + 0, 46)
- Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 20)
= (c1 - c2)
- Code(Counter(2)) at (prev + 3, 9) to (start + 0, 22)
- Code(Counter(2)) at (prev + 8, 11) to (start + 0, 19)
- Code(Counter(2)) at (prev + 0, 11) to (start + 0, 46)
- Code(Counter(2)) at (prev + 8, 11) to (start + 0, 46)
- Code(Counter(2)) at (prev + 0, 11) to (start + 0, 19)
- Code(Counter(2)) at (prev + 0, 20) to (start + 0, 34)
- Code(Counter(4)) at (prev + 1, 39) to (start + 0, 41)
- Code(Expression(2, Sub)) at (prev + 1, 14) to (start + 0, 20)
= (c2 - c4)
- Code(Counter(4)) at (prev + 2, 11) to (start + 0, 19)
- Code(Counter(4)) at (prev + 0, 11) to (start + 0, 46)
- Code(Counter(4)) at (prev + 2, 11) to (start + 0, 46)
- Code(Counter(4)) at (prev + 0, 11) to (start + 0, 19)
- Code(Counter(4)) at (prev + 0, 20) to (start + 0, 34)
- Code(Expression(4, Sub)) at (prev + 1, 39) to (start + 0, 41)
= (c4 - c5)
Expand All @@ -42,24 +42,24 @@ Number of file 0 mappings: 25
Highest counter ID seen: c5

Function name: yield::main::{closure#0}
Raw bytes (24): 0x[01, 01, 00, 04, 01, 09, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06]
Raw bytes (24): 0x[01, 01, 00, 04, 01, 0a, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06]
Number of files: 1
- file 0 => $DIR/yield.rs
Number of expressions: 0
Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 9, 8) to (start + 0, 9)
- Code(Counter(0)) at (prev + 10, 8) to (start + 0, 9)
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16)
- Code(Counter(1)) at (prev + 1, 16) to (start + 0, 21)
- Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6)
Highest counter ID seen: c1

Function name: yield::main::{closure#1}
Raw bytes (34): 0x[01, 01, 00, 06, 01, 18, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 09, 00, 10, 09, 01, 09, 00, 10, 0d, 01, 10, 00, 15, 0d, 01, 05, 00, 06]
Raw bytes (34): 0x[01, 01, 00, 06, 01, 19, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 09, 00, 10, 09, 01, 09, 00, 10, 0d, 01, 10, 00, 15, 0d, 01, 05, 00, 06]
Number of files: 1
- file 0 => $DIR/yield.rs
Number of expressions: 0
Number of file 0 mappings: 6
- Code(Counter(0)) at (prev + 24, 8) to (start + 0, 9)
- Code(Counter(0)) at (prev + 25, 8) to (start + 0, 9)
- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16)
- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 16)
- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 16)
Expand Down
1 change: 1 addition & 0 deletions tests/coverage/yield.coverage
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
LL| |//@ min-llvm-version: 23
LL| |#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
LL| |#![allow(unused_assignments)]
LL| |
Expand Down
1 change: 1 addition & 0 deletions tests/coverage/yield.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ min-llvm-version: 23
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
#![allow(unused_assignments)]

Expand Down
Loading