[PATCH] D145871: TableGen: Introduce `!range` operator for half-opened interval

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 11:13:36 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/TableGen/TGParser.cpp:1527
+        assert(isa<IntRecTy>(Arg0Ty));
+        assert(isa<IntRecTy>(cast<TypedInit>(InitList[1])->getType()));
+        LHS = Arg0;
----------------
I still see separate isa and cast?


================
Comment at: llvm/test/TableGen/range-op-fail.td:26
+// ERR3: [[FILE]]:[[@LINE+1]]:22: error: expected list or int, got value of type 'string'
+defvar errs = !range("hoge", "fuga");
+#endif
----------------
Test with mixed integer and not-integer


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145871/new/

https://reviews.llvm.org/D145871



More information about the llvm-commits mailing list