/// hasConstantValue - If the specified PHI node always merges together the
/// same value, return the value, otherwise return null.
///
- Value *hasConstantValue(bool AllowNonDominatingInstruction = false);
+ Value *hasConstantValue(bool AllowNonDominatingInstruction = false) const;
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const PHINode *) { return true; }
/// hasConstantValue - If the specified PHI node always merges together the same
/// value, return the value, otherwise return null.
///
-Value *PHINode::hasConstantValue(bool AllowNonDominatingInstruction) {
+Value *PHINode::hasConstantValue(bool AllowNonDominatingInstruction) const {
// If the PHI node only has one incoming value, eliminate the PHI node...
if (getNumIncomingValues() == 1)
return getIncomingValue(0);