[llvm-commits] [llvm] r60168 - in /llvm/trunk: include/llvm/Instruction.h lib/VMCore/Instruction.cpp

Chris Lattner sabre at nondot.org
Thu Nov 27 00:39:22 PST 2008


Author: lattner
Date: Thu Nov 27 02:39:18 2008
New Revision: 60168

URL: http://llvm.org/viewvc/llvm-project?rev=60168&view=rev
Log:
improve const correctness.

Modified:
    llvm/trunk/include/llvm/Instruction.h
    llvm/trunk/lib/VMCore/Instruction.cpp

Modified: llvm/trunk/include/llvm/Instruction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instruction.h?rev=60168&r1=60167&r2=60168&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Instruction.h (original)
+++ llvm/trunk/include/llvm/Instruction.h Thu Nov 27 02:39:18 2008
@@ -58,7 +58,7 @@
   /// 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 @@
   /// @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

Modified: llvm/trunk/lib/VMCore/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=60168&r1=60167&r2=60168&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Instruction.cpp (original)
+++ llvm/trunk/lib/VMCore/Instruction.cpp Thu Nov 27 02:39:18 2008
@@ -158,7 +158,7 @@
 /// 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 @@
 }
 
 // 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;





More information about the llvm-commits mailing list