Skip to content

Commit c7e4fa7

Browse files
author
Devang Patel
committed
Preserve line number info.
llvm-svn: 130876
1 parent e53ae50 commit c7e4fa7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,10 @@ Instruction *MemCpyOpt::tryMergingIntoMemset(Instruction *StartInst,
459459
for (unsigned i = 0, e = Range.TheStores.size(); i != e; ++i)
460460
dbgs() << *Range.TheStores[i] << '\n';
461461
dbgs() << "With: " << *AMemSet << '\n');
462-
462+
463+
if (!Range.TheStores.empty())
464+
AMemSet->setDebugLoc(Range.TheStores[0]->getDebugLoc());
465+
463466
// Zap all the stores.
464467
for (SmallVector<Instruction*, 16>::const_iterator
465468
SI = Range.TheStores.begin(),

0 commit comments

Comments
 (0)