summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2018-03-14 11:00:48 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2018-03-14 11:00:48 +0000
commitb61c26e6140caa8ba4d2e2329dcbdb18333f47a6 (patch)
tree481c75ab6f5284b5c2fd1718afa51cd4e16b7f76 /llvm/lib
parent77841b159abd5767fec6d26223420ec6d99c617d (diff)
downloadbcm5719-llvm-b61c26e6140caa8ba4d2e2329dcbdb18333f47a6.tar.gz
bcm5719-llvm-b61c26e6140caa8ba4d2e2329dcbdb18333f47a6.zip
TableGen: Allow dag operators to be resolved late
Change-Id: I51bb80fd5c48c8ac441ab11e43d43c1b91b4b590 Differential revision: https://reviews.llvm.org/D44113 llvm-svn: 327495
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/TableGen/Record.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 48197f04d11..e9325decfac 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -859,8 +859,13 @@ Init *BinOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const {
if (LHSs && RHSs) {
DefInit *LOp = dyn_cast<DefInit>(LHSs->getOperator());
DefInit *ROp = dyn_cast<DefInit>(RHSs->getOperator());
- if (!LOp || !ROp || LOp->getDef() != ROp->getDef())
- PrintFatalError("Concated Dag operators do not match!");
+ if (!LOp || !ROp)
+ break;
+ if (LOp->getDef() != ROp->getDef()) {
+ PrintFatalError(Twine("Concatenated Dag operators do not match: '") +
+ LHSs->getAsString() + "' vs. '" + RHSs->getAsString() +
+ "'");
+ }
SmallVector<Init*, 8> Args;
SmallVector<StringInit*, 8> ArgNames;
for (unsigned i = 0, e = LHSs->getNumArgs(); i != e; ++i) {
OpenPOWER on IntegriCloud