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.
llvm-svn: 176764
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index cc0356e..a79873c 100644
--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -668,7 +668,7 @@
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()),