================
@@ -30,49 +33,107 @@ CIRGenFunction::emitOMPErrorDirective(const
OMPErrorDirective &s) {
getCIRGenModule().errorNYI(s.getSourceRange(), "OpenMP OMPErrorDirective");
return mlir::failure();
}
-mlir::LogicalResult
-CIRGenFunction::emitOMPParallelDirective(const OMPParallelDirective &s) {
- mlir::LogicalResult res = mlir::success();
- mlir::Location begin = getLoc(s.getBeginLoc());
- mlir::Location end = getLoc(s.getEndLoc());
- mlir::omp::ParallelOperands clauseOps;
- OpenMPClauseEmitter ce(*this, getCIRGenModule(), builder, begin,
s.clauses());
+static llvm::SmallVector<const OMPClause *>
+getLeafClauses(CIRGenFunction &cgf, const OMPExecutableDirective &s,
+ llvm::omp::Directive leaf) {
+ unsigned version = cgf.getContext().getLangOpts().OpenMP;
+ llvm::SmallVector<omp::LeafWithClauses> leaves = omp::decompose(version, s);
+
+ llvm::SmallVector<const OMPClause *> result;
+ for (const omp::LeafWithClauses &l : leaves) {
+ if (l.id != leaf)
+ continue;
+ for (llvm::omp::Clause synth : l.synthesized)
+ cgf.getCIRGenModule().errorNYI(s.getSourceRange(),
----------------
skatrak wrote:
This currently emits an error and continues. Shouldn't it cause compilation to
abort? There seem to be a couple other places in this file where `errorNYI` is
called before continuing as well.
https://github.com/llvm/llvm-project/pull/207019
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits