mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 16:50:51 +08:00
[mlir][generate-test-checks] Do not emit the autogenerated note if it exists (#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 <michaelmaitland@meta.com>
This commit is contained in:
@@ -208,7 +208,7 @@ def process_source_lines(source_lines, note, args):
|
||||
source_segments = [[]]
|
||||
for line in source_lines:
|
||||
# Remove previous note.
|
||||
if line == note:
|
||||
if line in note:
|
||||
continue
|
||||
# Remove previous CHECK lines.
|
||||
if line.find(args.check_prefix) != -1:
|
||||
|
||||
Reference in New Issue
Block a user