CMake: removed lib/VMCore/DebugInfoBuilder.cpp.
[oota-llvm.git] / lib / VMCore / Instruction.cpp
index 01b69cad2afd2922cc2d20334d088a3bde07f9cd..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())
@@ -185,9 +185,9 @@ bool Instruction::isIdenticalTo(Instruction *I) const {
            CI->getAttributes().getRawPointer() ==
              cast<CallInst>(I)->getAttributes().getRawPointer();
   if (const InvokeInst *CI = dyn_cast<InvokeInst>(this))
-    return CI->getCallingConv() == cast<CallInst>(I)->getCallingConv() &&
+    return CI->getCallingConv() == cast<InvokeInst>(I)->getCallingConv() &&
            CI->getAttributes().getRawPointer() ==
-             cast<CallInst>(I)->getAttributes().getRawPointer();
+             cast<InvokeInst>(I)->getAttributes().getRawPointer();
   if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(this)) {
     if (IVI->getNumIndices() != cast<InsertValueInst>(I)->getNumIndices())
       return false;
@@ -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;
@@ -235,9 +235,9 @@ bool Instruction::isSameOperationAs(Instruction *I) const {
            CI->getAttributes().getRawPointer() ==
              cast<CallInst>(I)->getAttributes().getRawPointer();
   if (const InvokeInst *CI = dyn_cast<InvokeInst>(this))
-    return CI->getCallingConv() == cast<CallInst>(I)->getCallingConv() &&
+    return CI->getCallingConv() == cast<InvokeInst>(I)->getCallingConv() &&
            CI->getAttributes().getRawPointer() ==
-             cast<CallInst>(I)->getAttributes().getRawPointer();
+             cast<InvokeInst>(I)->getAttributes().getRawPointer();
   if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(this)) {
     if (IVI->getNumIndices() != cast<InsertValueInst>(I)->getNumIndices())
       return false;