diff options
author | Scott Linder <scott.linder@amd.com> | 2025-04-24 13:03:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-24 13:03:33 -0400 |
commit | e78b763568e47e685926614195c3075afa35668c (patch) | |
tree | 2fcc099b3183d09360a2b26dbd630fe1e130f415 /llvm/utils/UpdateTestChecks/common.py | |
parent | 565a075909046f74c2fbb7713419518464599a4e (diff) | |
download | llvm-e78b763568e47e685926614195c3075afa35668c.zip llvm-e78b763568e47e685926614195c3075afa35668c.tar.gz llvm-e78b763568e47e685926614195c3075afa35668c.tar.bz2 |
update_test_checks: Relax DIFile filename checks (#135692)
Avoid baking in absolute paths in check lines generated for DIFile
metadata. Generated test checks cannot be sensitive to absolute paths
anyway, as those vary with the environment, but there could be
situations where some sensitivity to partial paths is required for
certain tests. This implementation just assumes such tests aren't worth
the effort to support, but it could be supported in the future.
This is most useful for update_cc_test_checks with debug info enabled,
where the test writer cannot manipulate the paths within the generated
IR directly.
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r-- | llvm/utils/UpdateTestChecks/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py index 274614c..e747ae3 100644 --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -2358,7 +2358,7 @@ METADATA_FILTERS = [ r"(?<=\")(.+ )?(\w+ version )[\d.]+(?:[^\" ]*)(?: \([^)]+\))?", r"{{.*}}\2{{.*}}", ), # preface with glob also, to capture optional CLANG_VENDOR - (r'(!DIFile\(filename: ".+", directory: )".+"', r"\1{{.*}}"), + (r'(!DIFile\(filename: ")(.+/)?([^/]+", directory: )".+"', r"\1{{.*}}\3{{.*}}"), ] METADATA_FILTERS_RE = [(re.compile(f), r) for (f, r) in METADATA_FILTERS] |