Remove unnecessary store to temporary std::string.

llvm-svn: 76782
This commit is contained in:
Daniel Dunbar 2009-07-22 20:46:46 +00:00
parent 6e2eda1c8d
commit 0989a9a338
1 changed files with 4 additions and 3 deletions

View File

@ -762,9 +762,10 @@ Function *ArgPromotion::DoPromotion(Function *F,
for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) {
Idxs[1] = Context.getConstantInt(Type::Int32Ty, i);
std::string Name = TheAlloca->getName()+"."+utostr(i);
Value *Idx = GetElementPtrInst::Create(TheAlloca, Idxs, Idxs+2,
Name, InsertPt);
Value *Idx =
GetElementPtrInst::Create(TheAlloca, Idxs, Idxs+2,
TheAlloca->getName()+"."+utostr(i),
InsertPt);
I2->setName(I->getName()+"."+utostr(i));
new StoreInst(I2++, Idx, InsertPt);
}