summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-03-03 06:42:32 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-03-03 06:42:32 +0000
commit23e75f5b498abc0e6024e2753f35f62df918d595 (patch)
tree32316e79e6e659dc027b5d1b7b25345cba825270 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent6b08ae84978d4e47e6f6df5eb6d98c3614d61889 (diff)
downloadbcm5719-llvm-23e75f5b498abc0e6024e2753f35f62df918d595.tar.gz
bcm5719-llvm-23e75f5b498abc0e6024e2753f35f62df918d595.zip
SDOperand::isOperand should not be a forwarding. It must check *this against N's operands.
llvm-svn: 26502
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 293ea60c334..7312d66dd6b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2534,6 +2534,13 @@ bool SDNode::isOnlyUse(SDNode *N) const {
}
// isOperand - Return true if this node is an operand of N.
+bool SDOperand::isOperand(SDNode *N) const {
+ for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i)
+ if (*this == N->getOperand(i))
+ return true;
+ return false;
+}
+
bool SDNode::isOperand(SDNode *N) const {
for (unsigned i = 0, e = N->NumOperands; i != e; ++i)
if (this == N->OperandList[i].Val)
OpenPOWER on IntegriCloud