diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index 37379ef2904..dcca54d57b1 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/lib/Transforms/Instrumentation/TraceValues.cpp @@ -320,12 +320,11 @@ InsertPrintInsts(Value *Val, static LoadInst* -InsertLoadInst(StoreInst* storeInst, +InsertLoadInst(StoreInst *SI, BasicBlock *bb, BasicBlock::iterator &BBI) { - LoadInst* loadInst = new LoadInst(storeInst->getPointerOperand(), - storeInst->getIndices()); + LoadInst* loadInst = new LoadInst(SI->getPointerOperand(), SI->copyIndices()); BBI = bb->getInstList().insert(BBI, loadInst) + 1; return loadInst; }