diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-03-18 21:07:51 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-03-18 21:07:51 +0000 |
| commit | 81fd1f20bac3c8c360ed3cc40cd288170c83f6ae (patch) | |
| tree | 16a6f9f72ff38d050b12b4e2e7efe48e0cffb595 /llvm/utils/TableGen | |
| parent | 1f22d278f392dfe11689900d568854bfeca9ef87 (diff) | |
| download | bcm5719-llvm-81fd1f20bac3c8c360ed3cc40cd288170c83f6ae.tar.gz bcm5719-llvm-81fd1f20bac3c8c360ed3cc40cd288170c83f6ae.zip | |
disallow concatenation of two dags with different operators.
llvm-svn: 98871
Diffstat (limited to 'llvm/utils/TableGen')
| -rw-r--r-- | llvm/utils/TableGen/Record.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/utils/TableGen/Record.cpp b/llvm/utils/TableGen/Record.cpp index f9e2fe8a397..b9facb4c2a6 100644 --- a/llvm/utils/TableGen/Record.cpp +++ b/llvm/utils/TableGen/Record.cpp @@ -646,18 +646,8 @@ Init *BinOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) { if (LHSs && RHSs) { DefInit *LOp = dynamic_cast<DefInit*>(LHSs->getOperator()); DefInit *ROp = dynamic_cast<DefInit*>(RHSs->getOperator()); - if (LOp->getDef() != ROp->getDef()) { - bool LIsOps = - LOp->getDef()->getName() == "outs" || - LOp->getDef()->getName() != "ins" || - LOp->getDef()->getName() != "defs"; - bool RIsOps = - ROp->getDef()->getName() == "outs" || - ROp->getDef()->getName() != "ins" || - ROp->getDef()->getName() != "defs"; - if (!LIsOps || !RIsOps) - throw "Concated Dag operators do not match!"; - } + if (LOp == 0 || ROp == 0 || LOp->getDef() != ROp->getDef()) + throw "Concated Dag operators do not match!"; std::vector<Init*> Args; std::vector<std::string> ArgNames; for (unsigned i = 0, e = LHSs->getNumArgs(); i != e; ++i) { |

