summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-17 00:11:30 +0000
committerChris Lattner <sabre@nondot.org>2010-02-17 00:11:30 +0000
commitc2676b2909b18df10280b3692161ed43bc4503a3 (patch)
tree605bd8154d3baf801762bd8927211d4e7c08ab87
parent4a12de72b050f9276d2027fc9f7a29fc30af5cec (diff)
downloadllvm-c2676b2909b18df10280b3692161ed43bc4503a3.tar.gz
llvm-c2676b2909b18df10280b3692161ed43bc4503a3.tar.bz2
llvm-c2676b2909b18df10280b3692161ed43bc4503a3.tar.xz
fix inverted condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96416 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/TableGen/DAGISelMatcherGen.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/TableGen/DAGISelMatcherGen.cpp b/utils/TableGen/DAGISelMatcherGen.cpp
index e622eecd3c..532d3c1646 100644
--- a/utils/TableGen/DAGISelMatcherGen.cpp
+++ b/utils/TableGen/DAGISelMatcherGen.cpp
@@ -137,7 +137,9 @@ void MatcherGen::EmitLeafMatchCode(const TreePatternNode *N) {
return AddMatcherNode(new CheckCondCodeMatcherNode(LeafRec->getName()));
if (LeafRec->isSubClassOf("ComplexPattern")) {
- if (!N->getName().empty()) {
+ // We can't model ComplexPattern uses that don't have their name taken yet.
+ // The OPC_CheckComplexPattern operation implicitly records the results.
+ if (N->getName().empty()) {
errs() << "We expect complex pattern uses to have names: " << *N << "\n";
exit(1);
}