Support array indexing
authorChris Lattner <sabre@nondot.org>
Mon, 26 Nov 2001 17:00:43 +0000 (17:00 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 26 Nov 2001 17:00:43 +0000 (17:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1345 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/TraceValues.cpp

index 37379ef29044aabd0ca3928b17e7a029251c4dfc..dcca54d57b13367e7c2920b5ff7cd8e313b69660 100644 (file)
@@ -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;
 }