Skip to content

Commit 75947e2

Browse files
committed
update_mir_test_checks: keep commment embedded in MIR
We often add inline comment in mir. It is useful to keep them.
1 parent 70ef89b commit 75947e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/utils/update_mir_test_checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ def mangle_vreg(opcode, current_names):
339339

340340

341341
def should_add_line_to_output(input_line, prefix_set):
342-
# Skip any check lines that we're handling as well as comments
342+
# Skip any check lines that we're handling as well as blank comment.
343343
m = common.CHECK_RE.match(input_line)
344-
if (m and m.group(1) in prefix_set) or re.search("^[ \t]*;", input_line):
344+
if (m and m.group(1) in prefix_set) or input_line.strip() == ";":
345345
return False
346346
return True
347347

0 commit comments

Comments
 (0)