================ @@ -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) { ---------------- skatrak wrote:
Is there any reason for these functions to support unsupported lists of directives as input? I think it's worth having a simpler implementation over allowing all sorts of invalid lists of leaf constructs as input, unless there's a good reason why we'd need that. Not saying that the compiler should crash in that case, but they can just return empty ranges for unsupported lists of leaf constructs rather than trying to find subsets that match what we're looking for. 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