From 23e75f5b498abc0e6024e2753f35f62df918d595 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 3 Mar 2006 06:42:32 +0000 Subject: SDOperand::isOperand should not be a forwarding. It must check *this against N's operands. llvm-svn: 26502 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp') 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) -- cgit v1.2.3