Preserve line number info.

llvm-svn: 130876
This commit is contained in:
Devang Patel 2011-05-04 21:58:58 +00:00
parent e53ae508ec
commit c7e4fa7c19
1 changed files with 4 additions and 1 deletions

View File

@ -459,7 +459,10 @@ Instruction *MemCpyOpt::tryMergingIntoMemset(Instruction *StartInst,
for (unsigned i = 0, e = Range.TheStores.size(); i != e; ++i)
dbgs() << *Range.TheStores[i] << '\n';
dbgs() << "With: " << *AMemSet << '\n');
if (!Range.TheStores.empty())
AMemSet->setDebugLoc(Range.TheStores[0]->getDebugLoc());
// Zap all the stores.
for (SmallVector<Instruction*, 16>::const_iterator
SI = Range.TheStores.begin(),