use abstract accessors to CallInst
[oota-llvm.git] / lib / Transforms / Scalar / ScalarReplAggregates.cpp
index 27c954b2413a3e21d1752cfbf18f93d024658a93..5ca9ce376f252817f2774dc0565e6a05aa72a759 100644 (file)
@@ -1316,7 +1316,7 @@ void SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *Inst,
   }
   
   // Process each element of the aggregate.
-  Value *TheFn = MI->getOperand(0);
+  Value *TheFn = MI->getCalledValue();
   const Type *BytePtrTy = MI->getRawDest()->getType();
   bool SROADest = MI->getRawDest() == Inst;