[libcxx-commits] [libcxx] [libc++] Adds a new feature-test macro generator class. (PR #90889)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 23 09:15:02 PDT 2024


================
@@ -1857,6 +1858,215 @@ def produce_docs():
         f.write(doc_str)
 
 
+def get_std_dialects(data):
+    """Impementation for feature_test_macros.get_std_dialects()."""
+    dialects = set()
+    for feature in data:
+        keys = feature["values"].keys()
+        assert len(keys) > 0, "'values' is empty"
+        dialects |= keys
+
+    return sorted(dialects)
----------------
ldionne wrote:

```suggestion
    return sorted(list(dialects))
```

Because the attribute is going to return a `List[str]`.

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


More information about the libcxx-commits mailing list