probinson added a comment.

> IIUC the labels have to match a line in the file uniquely, which the DW_TAGs 
> wouldn't

CHECK-LABEL doesn't have to match a line in the file uniquely. What happens is 
that all the -LABEL directives are processed first, in order, subdividing the 
input text into regions. Then the non-LABEL directives are processed within 
their respective regions.

So you could have

  CHECK-LABEL: DW_TAG
  CHECK: DW_AT_name ("foo")
  CHECK-LABEL: DW_TAG
  CHECK: DW_AT_location
  CHECK-LABEL: DW_TAG

which would search only the first tag for "foo" and only the second tag for the 
location attribute.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139953/new/

https://reviews.llvm.org/D139953

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to