aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/BlockProfiling.cpp
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
commit0db69dcc87f62d85c782efcab4321f55f44dadb5 (patch)
tree613282169f3a075f18e3bae87abf51d30fe8941a /lib/Transforms/Instrumentation/BlockProfiling.cpp
parent7334b1521018651bf04d3da8d612cc9f2da506a8 (diff)
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/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);