[llvm] [TableGen] Add a !listflatten operator to TableGen (PR #109346)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 05:58:00 PDT 2024
================
@@ -987,6 +987,29 @@ Init *UnOpInit::Fold(Record *CurRec, bool IsFinal) const {
}
}
break;
+
+ case LISTFLATTEN:
+ if (ListInit *LHSList = dyn_cast<ListInit>(LHS)) {
+ ListRecTy *InnerListTy = dyn_cast<ListRecTy>(LHSList->getElementType());
+ // list of non-lists, !listflatten() is a NOP.
+ if (!InnerListTy)
----------------
jurahul wrote:
The nop case is handled here.
https://github.com/llvm/llvm-project/pull/109346
More information about the llvm-commits
mailing list