Support array indexing

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1345 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2001-11-26 17:00:43 +00:00
parent 491b29f247
commit 7c54b4a067

View File

@ -320,12 +320,11 @@ InsertPrintInsts(Value *Val,
static LoadInst* static LoadInst*
InsertLoadInst(StoreInst* storeInst, InsertLoadInst(StoreInst *SI,
BasicBlock *bb, BasicBlock *bb,
BasicBlock::iterator &BBI) BasicBlock::iterator &BBI)
{ {
LoadInst* loadInst = new LoadInst(storeInst->getPointerOperand(), LoadInst* loadInst = new LoadInst(SI->getPointerOperand(), SI->copyIndices());
storeInst->getIndices());
BBI = bb->getInstList().insert(BBI, loadInst) + 1; BBI = bb->getInstList().insert(BBI, loadInst) + 1;
return loadInst; return loadInst;
} }