diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-03-03 06:42:32 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-03-03 06:42:32 +0000 |
commit | bfa284f69752c54f81bffc2b0d15d5c1e618a659 (patch) | |
tree | a7ffe79cfdeea70d3131984935a52708cceaf3c0 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 80d8eaae05d9bcb25abf6c6f0385ec2554355f26 (diff) |
SDOperand::isOperand should not be a forwarding. It must check *this against N's operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 293ea60c33..7312d66dd6 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/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) |