mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 10:16:05 +00:00

If the function argument block contains patterns, we split argument matching into a separate SAME line, because LABEL labels may not contain pattern matches. Until now, in this case we moved the parenthesis opening the argument block into the second line. This generates incorrect labels in case function names are not prefix-free. For example, for a function `foo` we generated: CHECK-LABEL: foo CHECK-SAME: (<args of foo>) If the output also contains a function `foo.specialzied`, then the label for `foo` can match `foo.specialized`, depending on output order. This patch moves opening parenthesis to the first line, breaking common prefixes: CHECK-LABEL: foo( CHECK-SAME: <args of foo>) Bump the UTC version to 3, and only move the parenthesis for version 3 and later. Differential Revision: https://reviews.llvm.org/D158497