================ @@ -2579,11 +2639,32 @@ def generate_header_test_directory(self, path: os.path) -> None: def main(): + # + # Note this generator switches from the data structures in this file (v1) + # to data structures in an external json file (v2). This project is in its + # transition phase. So currently both data structures are present. + # + + # Generation using data structure v1 produce_version_header() produce_tests() produce_docs() - # Example how to use the new generator to generate the output. + # + # Conversion of the v1 data to v2 data. + # This is a temporary solution. + # + produce_json( + os.path.join(source_root, "utils", "data", "feature_test_macro", "data.json") + ) + + # Generation using data structure v2 + ftm = FeatureTestMacros( + os.path.join(source_root, "utils", "data", "feature_test_macro", "data.json") + ) + ftm.generate_header_test_directory(os.path.join(macro_test_path, "v2")) ---------------- mordante wrote:
For reference https://github.com/llvm/llvm-project/commit/ee96014023174d0f3bb10ed60682ae5ce591577e overwrites the existing files and contains the diff of the existing files. Note the new way adds a few additional files that are not in the current tests. For example, rcu is a header we have not yet implemented. https://github.com/llvm/llvm-project/pull/134555 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits