================
@@ -8928,9 +8970,44 @@ class OMPInitClause final
/// Returns true is interop-type 'targetsync' is used.
bool getIsTargetSync() const { return IsTargetSync; }
+ /// Returns true if OMP 6.0 {fr/attr} syntax is used.
+ bool getHasPreferAttrs() const { return HasPreferAttrs; }
+
+ /// Number of pref-specs in prefer_type(...).
+ unsigned getNumPrefs() const { return varlist_size() - 1; }
+
+ /// Total attrs across all pref-specs.
+ unsigned getNumAttrs() const { return NumAttrs; }
+
+ /// All attr() exprs across every pref-spec, in pref-spec order (flat block).
+ ArrayRef<Expr *> getAttrs() const {
+ return ArrayRef<Expr *>(getTrailingObjects<Expr *>() + varlist_size(),
+ NumAttrs);
+ }
+
+ /// Per-pref-spec attr end offsets: entry i is the inclusive cumulative attr
+ /// count through pref-spec i (one past its last attr in the flat attr
block).
+ ArrayRef<unsigned> getAttrEnds() const {
+ return getTrailingObjects<unsigned>(getNumPrefs());
+ }
----------------
alexey-bataev wrote:
Yes, if it is not used in other places
https://github.com/llvm/llvm-project/pull/198868
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits