Files
Anthony Latsis 5632f8dda0 [test] Expose LLVM_VERSION_MAJOR to Lit tests
This enables us to:
- Require at least a given `LLVM_VERSION_MAJOR`, 23 or greater, for a
  test, or apply the same logic to other Lit directives (`UNSUPPORTED`
  and `XFAIL`):
  ```
  // REQUIRES: LLVM_VERSION_MAJOR_AT_LEAST_24
  ```
- Form FileCheck prefixes based on `LLVM_VERSION_MAJOR` to implement
  version-sensitive checks:
  ```
  // RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefixes CHECK,CHECK-LLVM-%llvm_version_major`

  // CHECK-LABEL: define swiftcc void @foo
  // CHECK-LLVM-23: getelementptr inbounds ([3 x i32], ptr @"$s1A7AStructVAA8FuncOnlyAAWP", i32 0, i32 1)
  // CHECK-LLVM-24: getelementptr inbounds (i8, ptr @"$s1A7AStructVAA8FuncOnlyAAWP", i64 4)
  ```

These mechanisms are meant to provide redundancy for adapting to
upstream `llvm-project` changes on the `main` branch.

Follow-up to https://github.com/swiftlang/swift/pull/92138.
2026-10-06 12:04:48 +01:00
..
2026-01-11 18:24:43 +01:00