[libcxx-commits] [libcxx] [libc++][utils] Fix LIT `%if` substitution support (PR #209358)

Hubert Tong via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 14 07:28:35 PDT 2026


================
@@ -0,0 +1,11 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// Make sure that LIT `%if` substitutions are aware of the available features.
+
+// RUN: not %if libcpp-abi-version={{[0-9]+}} %{ not %} echo "hello world"
----------------
hubert-reinterpretcast wrote:

```suggestion
// RUN: not %if target={{.+}} %{ not %} echo "hello world"
```

https://github.com/llvm/llvm-project/pull/209358


More information about the libcxx-commits mailing list