fix llvm gen tests

This commit is contained in:
Folkert 2023-06-22 18:42:21 +02:00
parent f7104bfe54
commit c38f8bec75
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 35 additions and 40 deletions

View file

@ -144,14 +144,8 @@ fn build_eq<'a, 'ctx>(
lhs_val: BasicValueEnum<'ctx>, lhs_val: BasicValueEnum<'ctx>,
rhs_val: BasicValueEnum<'ctx>, rhs_val: BasicValueEnum<'ctx>,
lhs_layout: LayoutRepr<'a>, lhs_layout: LayoutRepr<'a>,
rhs_layout: LayoutRepr<'a>, _rhs_layout: LayoutRepr<'a>,
) -> BasicValueEnum<'ctx> { ) -> BasicValueEnum<'ctx> {
debug_assert_eq!(
lhs_layout, rhs_layout,
"Equality of different layouts; did you have a type mismatch?\n{:?} == {:?}",
lhs_layout, rhs_layout
);
match lhs_layout { match lhs_layout {
LayoutRepr::Builtin(builtin) => build_eq_builtin( LayoutRepr::Builtin(builtin) => build_eq_builtin(
env, env,

View file

@ -2211,6 +2211,7 @@ fn nullable_eval_cfold() {
#[test] #[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
fn nested_switch() { fn nested_switch() {
crate::helpers::with_larger_debug_stack(||
// exposed bug with passing the right symbol/layout down into switch branch generation // exposed bug with passing the right symbol/layout down into switch branch generation
// This is also the only test_gen test that exercises Reset/Reuse (as of Aug 2022) // This is also the only test_gen test that exercises Reset/Reuse (as of Aug 2022)
assert_evals_to!( assert_evals_to!(
@ -2249,7 +2250,7 @@ fn nested_switch() {
), ),
12, 12,
i64 i64
); ));
} }
#[test] #[test]