summaryrefslogtreecommitdiff
path: root/utils/TableGen/DAGISelMatcher.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-25 01:56:48 +0000
committerChris Lattner <sabre@nondot.org>2010-02-25 01:56:48 +0000
commit60df53e30a7e39c884f4ca4eb03346bea5825109 (patch)
tree8e8d8be88cebe5522a27c7768127b9c338af7837 /utils/TableGen/DAGISelMatcher.h
parent3ce2b097973e4b1a553373471cf2a5d9805903c5 (diff)
downloadllvm-60df53e30a7e39c884f4ca4eb03346bea5825109.tar.gz
llvm-60df53e30a7e39c884f4ca4eb03346bea5825109.tar.bz2
llvm-60df53e30a7e39c884f4ca4eb03346bea5825109.tar.xz
rename PushMatcherNode -> ScopeMatcherNode to more accurately
reflect what it does. Switch the sense of the Next and the Check arms to be more logical. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcher.h')
-rw-r--r--utils/TableGen/DAGISelMatcher.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/utils/TableGen/DAGISelMatcher.h b/utils/TableGen/DAGISelMatcher.h
index 3505bb82b6..757bf60658 100644
--- a/utils/TableGen/DAGISelMatcher.h
+++ b/utils/TableGen/DAGISelMatcher.h
@@ -39,7 +39,7 @@ class MatcherNode {
public:
enum KindTy {
// Matcher state manipulation.
- Push, // Push a checking scope.
+ Scope, // Push a checking scope.
RecordNode, // Record the current node.
RecordChild, // Record a child of the current node.
RecordMemRef, // Record the memref in the current node.
@@ -100,24 +100,24 @@ protected:
void printNext(raw_ostream &OS, unsigned indent) const;
};
-/// PushMatcherNode - This pushes a failure scope on the stack and evaluates
-/// 'Next'. If 'Next' fails to match, it pops its scope and attempts to
-/// match 'Failure'.
-class PushMatcherNode : public MatcherNode {
- OwningPtr<MatcherNode> Failure;
+/// ScopeMatcherNode - This pushes a failure scope on the stack and evaluates
+/// 'Check'. If 'Check' fails to match, it pops its scope and continues on to
+/// 'Next'.
+class ScopeMatcherNode : public MatcherNode {
+ OwningPtr<MatcherNode> Check;
public:
- PushMatcherNode(MatcherNode *next = 0, MatcherNode *failure = 0)
- : MatcherNode(Push), Failure(failure) {
+ ScopeMatcherNode(MatcherNode *check = 0, MatcherNode *next = 0)
+ : MatcherNode(Scope), Check(check) {
setNext(next);
}
- MatcherNode *getFailure() { return Failure.get(); }
- const MatcherNode *getFailure() const { return Failure.get(); }
- void setFailure(MatcherNode *N) { Failure.reset(N); }
- OwningPtr<MatcherNode> &getFailurePtr() { return Failure; }
+ MatcherNode *getCheck() { return Check.get(); }
+ const MatcherNode *getCheck() const { return Check.get(); }
+ void setCheck(MatcherNode *N) { Check.reset(N); }
+ OwningPtr<MatcherNode> &getCheckPtr() { return Check; }
static inline bool classof(const MatcherNode *N) {
- return N->getKind() == Push;
+ return N->getKind() == Scope;
}
virtual void print(raw_ostream &OS, unsigned indent = 0) const;