================
@@ -371,6 +370,26 @@ OMPForDirective *OMPForDirective::Create(
return Dir;
}
+Stmt *OMPLoopTransformationDirective::getTransformedStmt() const {
+ if (auto *D = dyn_cast<OMPCanonicalLoopNestTransformationDirective>(S)) {
+ return D->getTransformedStmt();
+ }
+ if (auto *D = dyn_cast<OMPCanonicalLoopSequenceTransformationDirective>(S)) {
+ return D->getTransformedStmt();
+ }
+ llvm_unreachable("unexpected object type");
+}
+
+Stmt *OMPLoopTransformationDirective::getPreInits() const {
+ if (auto *D = dyn_cast<OMPCanonicalLoopNestTransformationDirective>(S)) {
+ return D->getPreInits();
+ }
+ if (auto *D = dyn_cast<OMPCanonicalLoopSequenceTransformationDirective>(S)) {
+ return D->getPreInits();
+ }
----------------
alexey-bataev wrote:
Drop braces around one-line substatements
https://github.com/llvm/llvm-project/pull/139293
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits