aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/BlockProfiling.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Instrumentation/BlockProfiling.cpp')
-rw-r--r--lib/Transforms/Instrumentation/BlockProfiling.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp
index acde01888c..2bd9809a39 100644
--- a/lib/Transforms/Instrumentation/BlockProfiling.cpp
+++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp
@@ -72,7 +72,7 @@ bool FunctionProfiler::runOnModule(Module &M) {
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration())
// Insert counter at the start of the function
- IncrementCounterInBlock(I->begin(), i++, Counters);
+ IncrementCounterInBlock(&I->getEntryBlock(), i++, Counters);
// Add the initialization call to main.
InsertProfilingInitCall(Main, "llvm_start_func_profiling", Counters);