From 4f7a8129916ea4f8c1f18a6660346e4801a048e1 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 22 Sep 2017 16:57:28 +0000 Subject: [PATCH] Remove trailing whitespace. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313996 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/CodeGenDAGPatterns.cpp | 4 ++-- utils/TableGen/CodeGenDAGPatterns.h | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index d4c81c327ab..ed2ea75e943 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -880,7 +880,7 @@ std::string TreePredicateFn::getCodeToRunOnSDNode() const { " int64_t Imm = cast(Node)->getSExtValue();\n"; return Result + ImmCode; } - + // Handle arbitrary node predicates. assert(!getPredCode().empty() && "Don't have any predicate code!"); std::string ClassName; @@ -895,7 +895,7 @@ std::string TreePredicateFn::getCodeToRunOnSDNode() const { Result = " SDNode *N = Node;\n"; else Result = " auto *N = cast<" + ClassName + ">(Node);\n"; - + return Result + getPredCode(); } diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h index 37bfe022b4d..c82c4d17943 100644 --- a/utils/TableGen/CodeGenDAGPatterns.h +++ b/utils/TableGen/CodeGenDAGPatterns.h @@ -427,7 +427,7 @@ public: /// found, an error is flagged. bool ApplyTypeConstraints(TreePatternNode *N, TreePattern &TP) const; }; - + /// TreePredicateFn - This is an abstraction that represents the predicates on /// a PatFrag node. This is a simple one-word wrapper around a pointer to /// provide nice accessors. @@ -439,14 +439,14 @@ public: /// TreePredicateFn constructor. Here 'N' is a subclass of PatFrag. TreePredicateFn(TreePattern *N); - + TreePattern *getOrigPatFragRecord() const { return PatFragRec; } - + /// isAlwaysTrue - Return true if this is a noop predicate. bool isAlwaysTrue() const; - + bool isImmediatePattern() const { return !getImmCode().empty(); } - + /// getImmediatePredicateCode - Return the code that evaluates this pattern if /// this is an immediate predicate. It is an error to call this on a /// non-immediate pattern. @@ -455,8 +455,8 @@ public: assert(!Result.empty() && "Isn't an immediate pattern!"); return Result; } - - + + bool operator==(const TreePredicateFn &RHS) const { return PatFragRec == RHS.PatFragRec; } @@ -466,18 +466,18 @@ public: /// Return the name to use in the generated code to reference this, this is /// "Predicate_foo" if from a pattern fragment "foo". std::string getFnName() const; - + /// getCodeToRunOnSDNode - Return the code for the function body that /// evaluates this predicate. The argument is expected to be in "Node", /// not N. This handles casting and conversion to a concrete node type as /// appropriate. std::string getCodeToRunOnSDNode() const; - + private: std::string getPredCode() const; std::string getImmCode() const; }; - + /// FIXME: TreePatternNode's can be shared in some cases (due to dag-shaped /// patterns), and as such should be ref counted. We currently just leak all @@ -570,7 +570,7 @@ public: bool setDefaultMode(unsigned Mode); bool hasAnyPredicate() const { return !PredicateFns.empty(); } - + const std::vector &getPredicateFns() const { return PredicateFns; } -- 2.40.0