OSDN Git Service

[utils] change update_test_checks.py use of 'TMP' value names
authorSanjay Patel <spatel@rotateright.com>
Sun, 31 May 2020 14:46:11 +0000 (10:46 -0400)
committerSanjay Patel <spatel@rotateright.com>
Sun, 31 May 2020 14:46:11 +0000 (10:46 -0400)
commitbfdc2552664d6f0bb332a9c6a115877020f3c1df
tree7e987c07d45aa2420f8dcc8e112062c30096c9d9
parent91b45fb527af8f1f83b51e7238642d3af011bad4
[utils] change update_test_checks.py use of 'TMP' value names

As discussed in PR45951:
https://bugs.llvm.org/show_bug.cgi?id=45951

There's a potential name collision between update_test_checks.py and -instnamer
and/or manually-generated IR test files because all of them try to use the
variable name that should never be used: "tmp".

This patch proposes to reduce the odds of collision and adds a warning if we
detect the problem. This will cause regression test churn when regenerating
CHECK lines on existing files.

Differential Revision: https://reviews.llvm.org/D80584
llvm/utils/UpdateTestChecks/common.py