aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorBrox Chen <guochen2@amd.com>2024-10-29 13:48:43 -0400
committerGitHub <noreply@github.com>2024-10-29 13:48:43 -0400
commit528e975ac4081c7d84c5664c7ca9a18a916db4c7 (patch)
treeb1b00eb484affa8a1efa38d3aadb4988839098ea /llvm/utils/UpdateTestChecks/common.py
parent449523fa0f957db0fff1c0cd9ec5f59e858ece0b (diff)
downloadllvm-528e975ac4081c7d84c5664c7ca9a18a916db4c7.zip
llvm-528e975ac4081c7d84c5664c7ca9a18a916db4c7.tar.gz
llvm-528e975ac4081c7d84c5664c7ca9a18a916db4c7.tar.bz2
[AMDGPU][test]added unique and sort options for update_mc_test_check script (#111769)
add a unique and a sort option to the update_mc_test_check script. These mc asm/dasm files are usually large in number of lines, and these lines are mostly similar to each other. These options can be useful when maintainer is merging or resolving conflicts by making the file identifical Also fixed a small issue in asm/dasm such that the auto generated header line is 1. asm using ";" instead of "//" as comment marker 2. dasm using ";" instead of "#" as comment marker
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r--llvm/utils/UpdateTestChecks/common.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 0fbb734..cdfa897 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -275,8 +275,10 @@ class TestInfo(object):
self.run_lines = find_run_lines(test, self.input_lines)
self.comment_prefix = comment_prefix
if self.comment_prefix is None:
- if self.path.endswith(".mir"):
+ if self.path.endswith(".mir") or self.path.endswith(".txt"):
self.comment_prefix = "#"
+ elif self.path.endswith(".s"):
+ self.comment_prefix = "//"
else:
self.comment_prefix = ";"
self.autogenerated_note_prefix = self.comment_prefix + " " + UTC_ADVERT