summaryrefslogtreecommitdiff
path: root/lib/Analysis/ProfileInfo.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-03-22 16:38:57 +0000
committerDan Gohman <gohman@apple.com>2007-03-22 16:38:57 +0000
commitecb7a77885b174cf4d001a9b48533b3979e7810d (patch)
treeed6b55df739771a7691a200f47883ddde4c45f53 /lib/Analysis/ProfileInfo.cpp
parent2b48420c642de2fbf68a96d9b0bf45b5379455f3 (diff)
downloadllvm-ecb7a77885b174cf4d001a9b48533b3979e7810d.tar.gz
llvm-ecb7a77885b174cf4d001a9b48533b3979e7810d.tar.bz2
llvm-ecb7a77885b174cf4d001a9b48533b3979e7810d.tar.xz
Change uses of Function::front to Function::getEntryBlock for readability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ProfileInfo.cpp')
-rw-r--r--lib/Analysis/ProfileInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ProfileInfo.cpp b/lib/Analysis/ProfileInfo.cpp
index 719eeada15..6eead0fd6e 100644
--- a/lib/Analysis/ProfileInfo.cpp
+++ b/lib/Analysis/ProfileInfo.cpp
@@ -33,7 +33,7 @@ unsigned ProfileInfo::getExecutionCount(BasicBlock *BB) const {
// Are there zero predecessors of this block?
if (PI == PE) {
// If this is the entry block, look for the Null -> Entry edge.
- if (BB == &BB->getParent()->front())
+ if (BB == &BB->getParent()->getEntryBlock())
return getEdgeWeight(0, BB);
else
return 0; // Otherwise, this is a dead block.