[llvm-branch-commits] [llvm] 7a4af2a - [SelectionDAG] Use is_contained (NFC)

Kazu Hirata via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 2 19:14:38 PST 2020


Author: Kazu Hirata
Date: 2020-12-02T19:09:45-08:00
New Revision: 7a4af2a8e701838598cad254123b8a7855ee44c4

URL: https://github.com/llvm/llvm-project/commit/7a4af2a8e701838598cad254123b8a7855ee44c4
DIFF: https://github.com/llvm/llvm-project/commit/7a4af2a8e701838598cad254123b8a7855ee44c4.diff

LOG: [SelectionDAG] Use is_contained (NFC)

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 20e4ac590136..b0c8d4660f61 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -9317,7 +9317,7 @@ bool SDNode::areOnlyUsersOf(ArrayRef<const SDNode *> Nodes, const SDNode *N) {
 
 /// isOperand - Return true if this node is an operand of N.
 bool SDValue::isOperandOf(const SDNode *N) const {
-  return any_of(N->op_values(), [this](SDValue Op) { return *this == Op; });
+  return is_contained(N->op_values(), *this);
 }
 
 bool SDNode::isOperandOf(const SDNode *N) const {


        


More information about the llvm-branch-commits mailing list