namespace {
RegisterAnalysisGroup<ProfileInfo> Z("Profile Information");
}
+char ProfileInfo::ID = 0;
ProfileInfo::~ProfileInfo() {}
// 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.
namespace {
struct VISIBILITY_HIDDEN NoProfileInfo
- : public ImmutablePass, public ProfileInfo {};
+ : public ImmutablePass, public ProfileInfo {
+ static char ID; // Class identification, replacement for typeinfo
+ NoProfileInfo() : ImmutablePass((intptr_t)&ID) {}
+ };
+ char NoProfileInfo::ID = 0;
// Register this pass...
RegisterPass<NoProfileInfo>
X("no-profile", "No Profile Information");