[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

Krzysztof Parzyszek via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 06:21:33 PST 2024


================
@@ -342,4 +359,22 @@ def TDL_DirA : Directive<"dira"> {
 // IMPL-NEXT:    llvm_unreachable("Invalid Tdl Directive kind");
 // IMPL-NEXT:  }
 // IMPL-EMPTY:
+// IMPL-NEXT:  llvm::ArrayRef<llvm::tdl::Directive> llvm::tdl::getLeafConstructs(llvm::tdl::Directive Dir) {
+// IMPL-NEXT:    static llvm::ArrayRef<llvm::tdl::Directive> nothing {};
----------------
kparzysz wrote:

Returning an empty ArrayRef by value now.  I can't use regular array (as in the case of non-empty sets), because I can't create a zero-length array.  The empty ArrayRef does not refer to any storage, so returning it by value should be ok.

https://github.com/llvm/llvm-project/pull/83625


More information about the cfe-commits mailing list