[llvm] r176764 - Use the correct index variable. This is the meat of what was supposed to be in

Nick Lewycky nicholas at mxc.ca
Sat Mar 9 02:13:27 PST 2013


Author: nicholas
Date: Sat Mar  9 04:13:26 2013
New Revision: 176764

URL: http://llvm.org/viewvc/llvm-project?rev=176764&view=rev
Log:
Use the correct index variable. This is the meat of what was supposed to be in
r176751. Also, learn a lesson about applying patches by hand/eyeball.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp?rev=176764&r1=176763&r2=176764&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp Sat Mar  9 04:13:26 2013
@@ -668,7 +668,7 @@ void GCOVProfiler::insertCounterWriteout
       for (unsigned j = 0, e = CountersBySP.size(); j != e; ++j) {
         DISubprogram SP(CountersBySP[j].second);
         Builder.CreateCall3(EmitFunction,
-                            Builder.getInt32(i),
+                            Builder.getInt32(j),
                             NoFunctionNamesInData ?
                               Constant::getNullValue(Builder.getInt8PtrTy()) :
                               Builder.CreateGlobalStringPtr(SP.getName()),





More information about the llvm-commits mailing list