Make iostream #inclusion explicit
[oota-llvm.git] / lib / VMCore / Instruction.cpp
index e1dead99f23fc7260f91608057688b2867601096..a44b5e4b11ae410e338c5493c6b98fddcd64cacc 100644 (file)
@@ -65,6 +65,15 @@ void Instruction::eraseFromParent() {
   getParent()->getInstList().erase(this);
 }
 
+/// moveBefore - Unlink this instruction from its current basic block and
+/// insert it into the basic block that MovePos lives in, right before
+/// MovePos.
+void Instruction::moveBefore(Instruction *MovePos) {
+  MovePos->getParent()->getInstList().splice(MovePos,getParent()->getInstList(),
+                                             this);
+}
+
+
 const char *Instruction::getOpcodeName(unsigned OpCode) {
   switch (OpCode) {
   // Terminators
@@ -110,8 +119,9 @@ const char *Instruction::getOpcodeName(unsigned OpCode) {
   case Call:    return "call";
   case Shl:     return "shl";
   case Shr:     return "shr";
-  case VANext:  return "vanext";
-  case VAArg:   return "vaarg";
+  case VAArg:   return "va_arg";
+  case ExtractElement: return "extractelement";
+  case InsertElement: return "insertelement";
 
   default: return "<Invalid operator> ";
   }
@@ -139,8 +149,6 @@ bool Instruction::isIdenticalTo(Instruction *I) const {
     return LI->isVolatile() == cast<LoadInst>(I)->isVolatile();
   if (const StoreInst *SI = dyn_cast<StoreInst>(this))
     return SI->isVolatile() == cast<StoreInst>(I)->isVolatile();
-  if (const VANextInst *VAN = dyn_cast<VANextInst>(this))
-    return VAN->getArgType() == cast<VANextInst>(I)->getArgType();
   if (const CallInst *CI = dyn_cast<CallInst>(this))
     return CI->isTailCall() == cast<CallInst>(I)->isTailCall();
   return true;