Make enum-match.rs test robust against variable name changes

https://reviews.llvm.org/D140192 caused the LLVM variable generated
for enum discriminant checks to be named differently (%narrow vs %1).

This adjusts the test CHECK directives to match any name.
This commit is contained in:
Collin Baker 2022-12-16 17:32:29 -05:00
parent 63b3bac77c
commit 8751d3b2e9

View File

@ -34,8 +34,8 @@ pub enum Enum1 {
// CHECK: define i8 @match1{{.*}}
// CHECK-NEXT: start:
// CHECK-NEXT: %1 = {{.*}}call i8 @llvm.usub.sat.i8(i8 %0, i8 1)
// CHECK-NEXT: switch i8 %1, label {{.*}} [
// CHECK-NEXT: [[DISCR:%.*]] = {{.*}}call i8 @llvm.usub.sat.i8(i8 %0, i8 1)
// CHECK-NEXT: switch i8 [[DISCR]], label {{.*}} [
#[no_mangle]
pub fn match1(e: Enum1) -> u8 {
use Enum1::*;