[llvm] [TableGen] Add a !listflatten operator to TableGen (PR #109346)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 19 22:54:17 PDT 2024
================
@@ -0,0 +1,6 @@
+// RUN: not llvm-tblgen %s 2>&1 | FileCheck %s -DFILE=%s
+
+// CHECK: [[FILE]]:[[@LINE+2]]:33: error: expected argument of type list of list in !listflatten operator
+class Flatten<list<int> A> {
+ list<int> F = !listflatten(A);
----------------
arsenm wrote:
Test with some non-list types too. For the case of an already flat list, should it really be an error or a no-op?
https://github.com/llvm/llvm-project/pull/109346
More information about the llvm-commits
mailing list