summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelMatcher.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-18 02:53:41 +0000
committerChris Lattner <sabre@nondot.org>2010-02-18 02:53:41 +0000
commit186ad8098e609d34657814c38df07d7dc07784cd (patch)
tree386037d2d17cca4fa40315e667a9e27dfcbf248f /llvm/utils/TableGen/DAGISelMatcher.h
parentd582a367b5f7dd74d8835a23ad9b05bd437013a8 (diff)
downloadbcm5719-llvm-186ad8098e609d34657814c38df07d7dc07784cd.tar.gz
bcm5719-llvm-186ad8098e609d34657814c38df07d7dc07784cd.zip
rename the child field to 'next'. This is not a parent/child
relationship, this is a linear list relationship. llvm-svn: 96561
Diffstat (limited to 'llvm/utils/TableGen/DAGISelMatcher.h')
-rw-r--r--llvm/utils/TableGen/DAGISelMatcher.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/llvm/utils/TableGen/DAGISelMatcher.h b/llvm/utils/TableGen/DAGISelMatcher.h
index 4eb11010de9..41fbcb4c84a 100644
--- a/llvm/utils/TableGen/DAGISelMatcher.h
+++ b/llvm/utils/TableGen/DAGISelMatcher.h
@@ -31,7 +31,9 @@ void EmitMatcherTable(const MatcherNode *Matcher, raw_ostream &OS);
/// MatcherNode - Base class for all the the DAG ISel Matcher representation
/// nodes.
class MatcherNode {
- OwningPtr<MatcherNode> Child;
+ // The next matcher node that is executed after this one. Null if this is the
+ // last stage of a match.
+ OwningPtr<MatcherNode> Next;
public:
enum KindTy {
EmitNode,
@@ -63,16 +65,16 @@ public:
KindTy getKind() const { return Kind; }
- MatcherNode *getChild() { return Child.get(); }
- const MatcherNode *getChild() const { return Child.get(); }
- void setChild(MatcherNode *C) { Child.reset(C); }
+ MatcherNode *getNext() { return Next.get(); }
+ const MatcherNode *getNext() const { return Next.get(); }
+ void setNext(MatcherNode *C) { Next.reset(C); }
static inline bool classof(const MatcherNode *) { return true; }
virtual void print(raw_ostream &OS, unsigned indent = 0) const = 0;
void dump() const;
protected:
- void printChild(raw_ostream &OS, unsigned indent) const;
+ void printNext(raw_ostream &OS, unsigned indent) const;
};
/// EmitNodeMatcherNode - This signals a successful match and generates a node.
@@ -93,14 +95,14 @@ public:
/// PushMatcherNode - This pushes a failure scope on the stack and evaluates
-/// 'child'. If 'child' fails to match, it pops its scope and attempts to
+/// 'Next'. If 'Next' fails to match, it pops its scope and attempts to
/// match 'Failure'.
class PushMatcherNode : public MatcherNode {
OwningPtr<MatcherNode> Failure;
public:
- PushMatcherNode(MatcherNode *child = 0, MatcherNode *failure = 0)
+ PushMatcherNode(MatcherNode *next = 0, MatcherNode *failure = 0)
: MatcherNode(Push), Failure(failure) {
- setChild(child);
+ setNext(next);
}
MatcherNode *getFailure() { return Failure.get(); }
OpenPOWER on IntegriCloud