diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2016-04-19 21:58:10 +0000 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2016-04-19 21:58:10 +0000 |
commit | 152c18e9ac32a7e82d36dcc8c42cffc5487554b7 (patch) | |
tree | 2aabc810717d6f612dc53f0c5acc899749e7c6f9 | |
parent | 967f94253b23d91ee1eb8ddd1e70396fa0cde861 (diff) | |
download | bcm5719-llvm-152c18e9ac32a7e82d36dcc8c42cffc5487554b7.tar.gz bcm5719-llvm-152c18e9ac32a7e82d36dcc8c42cffc5487554b7.zip |
[TableGen] Make an error message slightly more informative
Reviewers: ab, spop, stoklund
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19192
llvm-svn: 266823
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index 0de3b61adf2..2c85dfc4f33 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -2974,9 +2974,16 @@ const DAGInstruction &CodeGenDAGPatterns::parseInstructionPattern( // fill in the InstResults map. for (unsigned j = 0, e = I->getNumTrees(); j != e; ++j) { TreePatternNode *Pat = I->getTree(j); - if (Pat->getNumTypes() != 0) + if (Pat->getNumTypes() != 0) { + std::string Types; + for (unsigned k = 0, ke = Pat->getNumTypes(); k != ke; ++k) { + if (k > 0) + Types += ", "; + Types += Pat->getExtType(k).getName(); + } I->error("Top-level forms in instruction pattern should have" - " void types"); + " void types, has types " + Types); + } // Find inputs and outputs, and verify the structure of the uses/defs. FindPatternInputsAndOutputs(I, Pat, InstInputs, InstResults, |