Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

65 lines
1.6 KiB
TableGen

// RUN: llvm-tblgen %s | FileCheck %s
// RUN: not llvm-tblgen -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s
// This file contains tests for the !find bang operator.
defvar Sentence = "This is the end of the world.";
// CHECK: def Rec01
// CHECK-NEXT: int FirstThe = 8
// CHECK-NEXT: int SameThe = 8
// CHECK-NEXT: int SecondThe = 19
// CHECK-NEXT: int ThirdThe = -1
def Rec01 {
int FirstThe = !find(Sentence, "the");
int SameThe = !find(Sentence, "the", FirstThe);
int SecondThe = !find(Sentence, "the", !add(FirstThe, 1));
int ThirdThe = !find(Sentence, "the", !add(SecondThe, 1));
}
class C1<string name> {
string Name = name;
bit IsJr = !ne(!find(name, "Jr"), -1);
}
// CHECK: def Rec02
// CHECK-NEXT: string Name = "Sally Smith"
// CHECK-NEXT: bit IsJr = 0
// CHECK: def Rec03
// CHECK-NEXT: string Name = "Fred Jones, Jr."
// CHECK-NEXT: bit IsJr = 1
def Rec02 : C1<"Sally Smith">;
def Rec03 : C1<"Fred Jones, Jr.">;
// CHECK: def Rec04
// CHECK-NEXT: int ThisPos = 0
// CHECK-NEXT: int WorldPos = 23
// CHECK-NEXT: int TooLong = -1
def Rec04 {
int ThisPos = !find(Sentence, "This");
int WorldPos = !find(Sentence, "world.");
int TooLong = !find(Sentence, "world.country");
}
// CHECK: def Rec05
// CHECK-NEXT: string Name = "Pat Snork"
// CHECK-NEXT: bit IsJr = 0
// CHECK-NEXT: bit JrOrSnork = 1
def Rec05 : C1<"Pat Snork"> {
bit JrOrSnork = !or(IsJr, !ne(!find(Name, "Snork"), -1));
}
#ifdef ERROR1
// ERROR1: !find start position is out of range 0...29: 100
def Rec06 {
int Test1 = !find(Sentence, "the", 100);
}
#endif