Mark hasConstantValue as a const method
authorChris Lattner <sabre@nondot.org>
Fri, 5 Aug 2005 00:49:06 +0000 (00:49 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 5 Aug 2005 00:49:06 +0000 (00:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22666 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Instructions.h
lib/VMCore/Instructions.cpp

index b2d055bf3bb142798b6138767acee9e72528b500..538c31ed1f42002df13b171bcc5611f9a097937f 100644 (file)
@@ -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; }
index 035edb320a6501f3fbe3f16e812d2148ede5ca9f..a3bd468fccf746ad35f61d9930891ccbdffc58e0 100644 (file)
@@ -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);