[PATCH] D30725: [FileCheck] Added [[@CLEAR:regex]] as a way to clear variables.

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 17:11:30 PST 2017


tra added a comment.

@arsenm

I think check-label and regex variables are orthogonal. CHECK-LABEL does separate chunks of input for matching and error reporting purposes, but regex variables are more akin to a preprocessor -- we use variable value to construct regex to match against the input. I don't think CHECK-LABEL is a good fit for hard boundary on variable lifetime.

Here's one (reasonable, I believe) use case for across-the-CHECK-LABEL vars:

  ; CHECK-LABEL: generated_function_foo
  ; CHECK: store something [[SHARED_OBJECT:generated_object_name_x[0-9]+]]
  ...
  ; CHECK-LABEL: generated_function_bar
  ; CHECK: x = load [[SHARED_OBJECT]]


https://reviews.llvm.org/D30725





More information about the llvm-commits mailing list