diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-18 02:49:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-18 02:49:24 +0000 |
commit | 8ef9c7958ad7a23ad15d7ff59e1377aec10ca42a (patch) | |
tree | 19903cad87abe39857fad8df3aa9d21e532a940c /utils/TableGen/DAGISelMatcherEmitter.cpp | |
parent | f6afae2f49ed65a6a482257c7e55520857d751b7 (diff) | |
download | external_llvm-8ef9c7958ad7a23ad15d7ff59e1377aec10ca42a.zip external_llvm-8ef9c7958ad7a23ad15d7ff59e1377aec10ca42a.tar.gz external_llvm-8ef9c7958ad7a23ad15d7ff59e1377aec10ca42a.tar.bz2 |
eliminate the MatcherNodeWithChild class, give the 'child'
field to MatcherNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcherEmitter.cpp')
-rw-r--r-- | utils/TableGen/DAGISelMatcherEmitter.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index c284761..ea134fe 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -221,7 +221,7 @@ EmitMatcher(const MatcherNode *N, unsigned Indent) { unsigned MatcherTableEmitter:: EmitMatcherAndChildren(const MatcherNode *N, unsigned Indent) { unsigned Size = 0; - while (1) { + while (N) { // Push is a special case since it is binary. if (const PushMatcherNode *PMN = dyn_cast<PushMatcherNode>(N)) { // We need to encode the child and the offset of the failure code before @@ -256,11 +256,9 @@ EmitMatcherAndChildren(const MatcherNode *N, unsigned Indent) { // If there are children of this node, iterate to them, otherwise we're // done. - if (const MatcherNodeWithChild *MNWC = dyn_cast<MatcherNodeWithChild>(N)) - N = MNWC->getChild(); - else - return Size; + N = N->getChild(); } + return Size; } void MatcherTableEmitter::EmitPredicateFunctions() { |