> One idea I had was for a new directive something like "CHECK-IMMEDIATE" which
> is implicitly the same as the final approach I suggested above, but maybe adding a new
> directive to achieve this isn't the right approach?
"CHECK-IMMEDIATE" (or "CHECK-CONTINUE"/better name) sound like a clean and fine approach to me.
I'd go with it probably.
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
I have to say, I’m not super excited about the answer always being “let’s add another FileCheck directive.” FileCheck is basically a meta-grep, that knows how to execute some sub-searches in different orders. Asking it to do things like implicit paren balancing is really out of scope for the tool.
--paulr
I think we should think about changing llvm-readobj to produce more filecheck friendly output.This was a problem we used to have with LLVM debug info metadata: it wasn't very structured, and it was printed in some arbitrary order. Then Duncan (I think) added the DI* classes, which made it easier to match something semantic, like `DILocalVariable.*name: "foo"`, and standardized on a topological output ordering, so you could start from the variable, then match the type, and then find the type metadata number later.If we printed `Section (.foo) {` for example, that would help some.It still doesn't help establish delimited regions for properties printed across multiple lines for readability, though... Should we add some kind of ad-hoc delimiter balancing to FileCheck? Something like:CHECK-SCOPE: Section {CHECK: Name: asdfCHECK: Name: asdfCHECK-ENDSCOPE: }
> Or, if you're checking every section, you could use a --implicit-check-not=Symbol
or similar.