summaryrefslogtreecommitdiffstats
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
commit72e66eedb8d47402a3bd071e1f79267f2aa0c68b (patch)
treea5838418f8bad113031d427247e5f08b13ee4a3c
parent0e12e5b12c344b23920edd5adebf9ef740e92749 (diff)
downloadbcm5719-llvm-72e66eedb8d47402a3bd071e1f79267f2aa0c68b.tar.gz
bcm5719-llvm-72e66eedb8d47402a3bd071e1f79267f2aa0c68b.zip
Use Function::getEntryBlock() instead of Function::front(), for clarity.
llvm-svn: 57870
-rw-r--r--llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp b/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
index acde01888ca..2bd9809a396 100644
--- a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud