[llvm-commits] [llvm] r130876 - /llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
Devang Patel
dpatel at apple.com
Wed May 4 14:58:58 PDT 2011
Author: dpatel
Date: Wed May 4 16:58:58 2011
New Revision: 130876
URL: http://llvm.org/viewvc/llvm-project?rev=130876&view=rev
Log:
Preserve line number info.
Modified:
llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp?rev=130876&r1=130875&r2=130876&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp Wed May 4 16:58:58 2011
@@ -459,7 +459,10 @@
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(),
More information about the llvm-commits
mailing list