diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-12-25 13:35:40 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-12-25 13:35:40 +0000 |
commit | 7529ece7af777b72e8658845a575eab08214d655 (patch) | |
tree | 9f5ecc557469e2892eba726543f5640979e2a8d0 /utils | |
parent | 6a09affdf62fccbd190ca6e9cac0cb065b5f2677 (diff) | |
download | llvm-7529ece7af777b72e8658845a575eab08214d655.tar.gz llvm-7529ece7af777b72e8658845a575eab08214d655.tar.bz2 llvm-7529ece7af777b72e8658845a575eab08214d655.tar.xz |
Use the 'MadeChange' variable instead of returning 'false' all of the time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index fab41c5f4c..cf79365b86 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -321,8 +321,7 @@ bool SDTypeConstraint::ApplyTypeConstraint(TreePatternNode *N, getOperandNum(x.SDTCisVTSmallerThanOp_Info.OtherOperandNum, N,NumResults); // It must be integer. - bool MadeChange = false; - MadeChange |= OtherNode->UpdateNodeType(MVT::iAny, TP); + bool MadeChange = OtherNode->UpdateNodeType(MVT::iAny, TP); // This code only handles nodes that have one type set. Assert here so // that we can change this if we ever need to deal with multiple value @@ -330,7 +329,7 @@ bool SDTypeConstraint::ApplyTypeConstraint(TreePatternNode *N, assert(OtherNode->getExtTypes().size() == 1 && "Node has too many types!"); if (OtherNode->hasTypeSet() && OtherNode->getTypeNum(0) <= VT) OtherNode->UpdateNodeType(MVT::Other, TP); // Throw an error. - return false; + return MadeChange; } case SDTCisOpSmallerThanOp: { TreePatternNode *BigOperand = |