From ecb7a77885b174cf4d001a9b48533b3979e7810d Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 22 Mar 2007 16:38:57 +0000 Subject: 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 --- lib/Analysis/ProfileInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Analysis/ProfileInfo.cpp') 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. -- cgit v1.2.3