Constify parameters in SelectionDAG methods. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pete Cooper
2015-07-14 21:54:52 +00:00
parent ec664779b3
commit f1c70f9279
2 changed files with 6 additions and 6 deletions

View File

@@ -140,7 +140,7 @@ public:
} }
// Return true if this node is an operand of N. // Return true if this node is an operand of N.
bool isOperandOf(SDNode *N) const; bool isOperandOf(const SDNode *N) const;
/// Return the ValueType of the referenced return value. /// Return the ValueType of the referenced return value.
inline EVT getValueType() const; inline EVT getValueType() const;
@@ -532,10 +532,10 @@ public:
bool hasAnyUseOfValue(unsigned Value) const; bool hasAnyUseOfValue(unsigned Value) const;
/// Return true if this node is the only use of N. /// Return true if this node is the only use of N.
bool isOnlyUserOf(SDNode *N) const; bool isOnlyUserOf(const SDNode *N) const;
/// Return true if this node is an operand of N. /// Return true if this node is an operand of N.
bool isOperandOf(SDNode *N) const; bool isOperandOf(const SDNode *N) const;
/// Return true if this node is a predecessor of N. /// Return true if this node is a predecessor of N.
/// NOTE: Implemented on top of hasPredecessor and every bit as /// NOTE: Implemented on top of hasPredecessor and every bit as

View File

@@ -6670,7 +6670,7 @@ bool SDNode::hasAnyUseOfValue(unsigned Value) const {
/// isOnlyUserOf - Return true if this node is the only use of N. /// isOnlyUserOf - Return true if this node is the only use of N.
/// ///
bool SDNode::isOnlyUserOf(SDNode *N) const { bool SDNode::isOnlyUserOf(const SDNode *N) const {
bool Seen = false; bool Seen = false;
for (SDNode::use_iterator I = N->use_begin(), E = N->use_end(); I != E; ++I) { for (SDNode::use_iterator I = N->use_begin(), E = N->use_end(); I != E; ++I) {
SDNode *User = *I; SDNode *User = *I;
@@ -6685,14 +6685,14 @@ bool SDNode::isOnlyUserOf(SDNode *N) const {
/// isOperand - Return true if this node is an operand of N. /// isOperand - Return true if this node is an operand of N.
/// ///
bool SDValue::isOperandOf(SDNode *N) const { bool SDValue::isOperandOf(const SDNode *N) const {
for (const SDValue &Op : N->op_values()) for (const SDValue &Op : N->op_values())
if (*this == Op) if (*this == Op)
return true; return true;
return false; return false;
} }
bool SDNode::isOperandOf(SDNode *N) const { bool SDNode::isOperandOf(const SDNode *N) const {
for (const SDValue &Op : N->op_values()) for (const SDValue &Op : N->op_values())
if (this == Op.getNode()) if (this == Op.getNode())
return true; return true;