================ @@ -25,6 +25,43 @@ using namespace llvm::omp; #define GEN_DIRECTIVES_IMPL #include "llvm/Frontend/OpenMP/OMP.inc" +static iterator_range<ArrayRef<Directive>::iterator> +getFirstCompositeRange(iterator_range<ArrayRef<Directive>::iterator> Leafs) { ---------------- kparzysz wrote:
This is intended to be a general utility to find the first sequence of leaf constructs that together constitute a composite construct. The input leafs aren't assumed to represent a legal construct. It's also used in `isCompositeConstruct` as well, where I break up the given directive into leafs and check if the "first composite range" is equal to the sequence of leafs. https://github.com/llvm/llvm-project/pull/89104 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits