use abstract accessors to CallInst
[oota-llvm.git] / lib / Transforms / Scalar / MemCpyOptimizer.cpp
index 3b305ae766e811e9d422f2c6d38a8daf8d3dd42b..3611b8ebe562de9d331cc74cfcf7a150520e03a4 100644 (file)
@@ -744,7 +744,7 @@ bool MemCpyOpt::processMemMove(MemMoveInst *M) {
   const Type *ArgTys[3] = { M->getRawDest()->getType(),
                             M->getRawSource()->getType(),
                             M->getLength()->getType() };
-  M->setOperand(0,Intrinsic::getDeclaration(Mod, Intrinsic::memcpy, ArgTys, 3));
+  M->setCalledFunction(Intrinsic::getDeclaration(Mod, Intrinsic::memcpy, ArgTys, 3));
 
   // MemDep may have over conservative information about this instruction, just
   // conservatively flush it from the cache.