================ @@ -0,0 +1,355 @@ +# ===----------------------------------------------------------------------===## +# +# 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 +# +# ===----------------------------------------------------------------------===## + +import lit +import os +import re +from .base import FileBasedTest + + +def _getSubstitution(substitution, config): + """ + Helper function to get a specific substitution from a config object. + """ + for (orig, replacement) in config.substitutions: + if orig == substitution: + return replacement + raise ValueError("Substitution {} is not in the config.".format(substitution)) + + +def _appendToSubstitution(substitutions, key, value): ---------------- mordante wrote:
Should we also add `_prependToSubstitution` which is also in `dsl.py`? https://github.com/llvm/llvm-project/pull/90803 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits