#include "llvm/Analysis/ProfileInfo.h"
#include "llvm/Analysis/ProfileInfoLoader.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/Streams.h"
using namespace llvm;
cl::value_desc("filename"),
cl::desc("Profile file loaded by -profile-loader"));
- class LoaderPass : public ModulePass, public ProfileInfo {
+ class VISIBILITY_HIDDEN LoaderPass : public ModulePass, public ProfileInfo {
std::string Filename;
public:
+ static char ID; // Class identification, replacement for typeinfo
LoaderPass(const std::string &filename = "")
- : Filename(filename) {
+ : ModulePass((intptr_t)&ID), Filename(filename) {
if (filename.empty()) Filename = ProfileInfoFilename;
}
virtual bool runOnModule(Module &M);
};
+ char LoaderPass::ID = 0;
RegisterPass<LoaderPass>
X("profile-loader", "Load profile information from llvmprof.out");
TerminatorInst *TI = BB->getTerminator();
if (SuccNum >= TI->getNumSuccessors()) {
if (!PrintedWarning) {
- llvm_cerr << "WARNING: profile information is inconsistent with "
- << "the current program!\n";
+ cerr << "WARNING: profile information is inconsistent with "
+ << "the current program!\n";
PrintedWarning = true;
}
} else {