aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-03-03 06:24:54 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-03-03 06:24:54 +0000
commit80d8eaae05d9bcb25abf6c6f0385ec2554355f26 (patch)
treeea0fa6d134dac5c2773a09c7ed01cbf5d9f2cbd0 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentfb43331226ae41cac862972c52a05f6c05dfcf19 (diff)
Added isOperand(N): true if this is an operand of N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 24497af234..293ea60c33 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2533,6 +2533,13 @@ bool SDNode::isOnlyUse(SDNode *N) const {
return Seen;
}
+// isOperand - Return true if this node is an operand of N.
+bool SDNode::isOperand(SDNode *N) const {
+ for (unsigned i = 0, e = N->NumOperands; i != e; ++i)
+ if (this == N->OperandList[i].Val)
+ return true;
+ return false;
+}
const char *SDNode::getOperationName(const SelectionDAG *G) const {
switch (getOpcode()) {