aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-10-21 03:10:28 +0000
committerDan Gohman <gohman@apple.com>2008-10-21 03:10:28 +0000
commit1045412e882f59ba965e28d72c90d520186b38af (patch)
tree613282169f3a075f18e3bae87abf51d30fe8941a /lib/Transforms/Instrumentation
parent67825b038298c790f78857579d4c5dd3b91e589f (diff)
downloadexternal_llvm-1045412e882f59ba965e28d72c90d520186b38af.zip
external_llvm-1045412e882f59ba965e28d72c90d520186b38af.tar.gz
external_llvm-1045412e882f59ba965e28d72c90d520186b38af.tar.bz2
Use Function::getEntryBlock() instead of Function::front(), for clarity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-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 acde018..2bd9809 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);