[llvm] [LLVM][TableGen] Support type casts of nodes with multiple results (PR #109728)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 00:24:11 PDT 2024
================
@@ -2896,6 +2896,35 @@ TreePatternNodePtr TreePattern::ParseTreePattern(Init *TheInit,
error("Pattern has unexpected init kind!");
return nullptr;
}
+
+ auto ParseCastOperand = [this](DagInit *Dag, StringRef OpName) {
+ if (Dag->getNumArgs() != 1)
+ error("Type cast only takes one operand!");
+
+ if (!OpName.empty())
+ error("Type cast should not have a name!");
+
----------------
arsenm wrote:
Can you add tests for these error conditions?
https://github.com/llvm/llvm-project/pull/109728
More information about the llvm-commits
mailing list