Skip to content

Commit 27398fd

Browse files
committed
More new trait methods, changes return types and error variants
1 parent 83f37b0 commit 27398fd

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/rustc_codegen_spirv/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ rustc_codegen_spirv-target-specs.workspace = true
6767

6868
[dev-dependencies]
6969
pretty_assertions = "1.0"
70+
termcolor = "1.1.3"
7071

7172
# HACK(eddyb) can't re-introduce deps of `rustc_codegen_ssa`, for `pqp_cg_ssa`
7273
# (see `build.rs`).

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2795,6 +2795,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
27952795
_src_align: Align,
27962796
size: Self::Value,
27972797
flags: MemFlags,
2798+
tt: Option<rustc_ast::expand::typetree::FncTree>,
27982799
) {
27992800
if flags != MemFlags::empty() {
28002801
self.err(format!(
@@ -2881,7 +2882,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
28812882
size: Self::Value,
28822883
flags: MemFlags,
28832884
) {
2884-
self.memcpy(dst, dst_align, src, src_align, size, flags);
2885+
self.memcpy(dst, dst_align, src, src_align, size, flags, None);
28852886
}
28862887

28872888
fn memset(
@@ -3127,6 +3128,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
31273128
dst: Self::Value,
31283129
src: Self::Value,
31293130
order: AtomicOrdering,
3131+
_ret_ptr: bool,
31303132
) -> Self::Value {
31313133
let ty = src.ty;
31323134

crates/rustc_codegen_spirv/src/builder/mod.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl<'a, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'tcx> {
182182
_direct_offset: Size,
183183
// NB: each offset implies a deref (i.e. they're steps in a pointer chain).
184184
_indirect_offsets: &[Size],
185-
_fragment: Option<Range<Size>>,
185+
_fragment: &Option<Range<Size>>,
186186
) {
187187
todo!()
188188
}
@@ -202,6 +202,21 @@ impl<'a, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'tcx> {
202202
fn set_var_name(&mut self, _value: Self::Value, _name: &str) {
203203
todo!()
204204
}
205+
206+
fn dbg_var_value(
207+
&mut self,
208+
_dbg_var: Self::DIVariable,
209+
_dbg_loc: Self::DILocation,
210+
_value: Self::Value,
211+
_direct_offset: Size,
212+
// NB: each offset implies a deref (i.e. they're steps in a pointer chain).
213+
_indirect_offsets: &[Size],
214+
// Byte range in the `dbg_var` covered by this fragment,
215+
// if this is a fragment of a composite `DIVariable`.
216+
_fragment: &Option<Range<Size>>,
217+
) {
218+
todo!()
219+
}
205220
}
206221

207222
impl<'a, 'tcx> ArgAbiBuilderMethods<'tcx> for Builder<'a, 'tcx> {

crates/rustc_codegen_spirv/src/codegen_cx/constant.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ impl<'tcx> CodegenCx<'tcx> {
506506

507507
// HACK(eddyb) these should never happen when using
508508
// `read_scalar`, but better not outright crash.
509-
AllocError::ScalarSizeMismatch(_)
510-
| AllocError::OverwritePartialPointer(_) => {
509+
AllocError::ScalarSizeMismatch(_) => {
511510
Err(format!("unrecognized `AllocError::{err:?}`"))
512511
}
513512
},

0 commit comments

Comments
 (0)