Skip to content

Commit

Permalink
don't have CHECK-LABEL consume the whole line
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLydike committed Jul 7, 2024
1 parent ba52069 commit e338243
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 0 additions & 4 deletions filecheck/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ def compile_uops(
# we don't do numerical substitutions yet
raise NotImplementedError("Numerical substitutions not supported!")

# make sure CHECK-LABEL consumes entire line
if check.name == "LABEL":
expr.append(r"[^\n]*")

print(f"given: {check.arg}")
print(f"compiled: {re.compile(''.join(expr))}")
return re.compile("".join(expr)), captures
8 changes: 8 additions & 0 deletions tests/filecheck/checks/check-label.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ region_b:
// CHECK-NEXT: op a
// CHECK-NEXT: op b
// CHECK-NEXT: op c


@func(%arg0: i32)
op %arg0

// CHECK-LABEL: @func
// CHECK-SAME: ([[arg:%[A-Za-z0-9]+]]: i32)
// CHECK: op [[arg]]
File renamed without changes.

0 comments on commit e338243

Please sign in to comment.