Skip to content

Commit 7e73065

Browse files
michaelmaitlandMichael Maitland
authored andcommitted
[mlir][generate-test-checks] Do not emit the autogenerated note if it exists (llvm#143750)
Prior to this PR, the script removed the already existing autogenerated note if we came across a line that was equal to the note. But the default note is multiple lines, so there would never be a match. Instead, check to see if the current line is a substring of the autogenerated note. Co-authored-by: Michael Maitland <[email protected]>
1 parent 0bd09c6 commit 7e73065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/utils/generate-test-checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def process_source_lines(source_lines, note, args):
208208
source_segments = [[]]
209209
for line in source_lines:
210210
# Remove previous note.
211-
if line == note:
211+
if line in note:
212212
continue
213213
# Remove previous CHECK lines.
214214
if line.find(args.check_prefix) != -1:

0 commit comments

Comments
 (0)