improve const correctness.
authorChris Lattner <sabre@nondot.org>
Thu, 27 Nov 2008 08:39:18 +0000 (08:39 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 27 Nov 2008 08:39:18 +0000 (08:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60168 91177308-0d34-0410-b5e6-96231b3b80d8

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

index f56b96fe5e9921bdf23a68d0332218f27154cb36..9a7f769a94f9c5bb8fd3f13aadac6bc73435ffb7 100644 (file)
@@ -58,7 +58,7 @@ public:
   /// isIdenticalTo - Return true if the specified instruction is exactly
   /// identical to the current one.  This means that all operands match and any
   /// extra information (e.g. load is volatile) agree.
-  bool isIdenticalTo(Instruction *I) const;
+  bool isIdenticalTo(const Instruction *I) const;
 
   /// This function determines if the specified instruction executes the same
   /// operation as the current one. This means that the opcodes, type, operand
@@ -68,7 +68,7 @@ public:
   /// @returns true if the specified instruction is the same operation as
   /// the current one.
   /// @brief Determine if one instruction is the same operation as another.
-  bool isSameOperationAs(Instruction *I) const;
+  bool isSameOperationAs(const Instruction *I) const;
 
   /// isUsedOutsideOfBlock - Return true if there are any uses of this
   /// instruction in blocks other than the specified block.  Note that PHI nodes
index e9653ceea559ac23fa4cf8b664d3cfd9c7b0a286..6635e704e2ac9fbc440df8dd917d1eca54b25d4f 100644 (file)
@@ -158,7 +158,7 @@ const char *Instruction::getOpcodeName(unsigned OpCode) {
 /// isIdenticalTo - Return true if the specified instruction is exactly
 /// identical to the current one.  This means that all operands match and any
 /// extra information (e.g. load is volatile) agree.
-bool Instruction::isIdenticalTo(Instruction *I) const {
+bool Instruction::isIdenticalTo(const Instruction *I) const {
   if (getOpcode() != I->getOpcode() ||
       getNumOperands() != I->getNumOperands() ||
       getType() != I->getType())
@@ -209,7 +209,7 @@ bool Instruction::isIdenticalTo(Instruction *I) const {
 }
 
 // isSameOperationAs
-bool Instruction::isSameOperationAs(Instruction *I) const {
+bool Instruction::isSameOperationAs(const Instruction *I) const {
   if (getOpcode() != I->getOpcode() || getType() != I->getType() ||
       getNumOperands() != I->getNumOperands())
     return false;