From 9acbd611ec13fabf3c13f20161c0de576ea1ad60 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 5 Aug 2005 00:49:06 +0000 Subject: [PATCH] Mark hasConstantValue as a const method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22666 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Instructions.h | 2 +- lib/VMCore/Instructions.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index b2d055bf3bb..538c31ed1f4 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -807,7 +807,7 @@ public: /// 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; } diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 035edb320a6..a3bd468fccf 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -135,7 +135,7 @@ void PHINode::resizeOperands(unsigned NumOps) { /// 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);