diff options
Diffstat (limited to 'lib/Analysis/ProfileInfoLoaderPass.cpp')
-rw-r--r-- | lib/Analysis/ProfileInfoLoaderPass.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/Analysis/ProfileInfoLoaderPass.cpp b/lib/Analysis/ProfileInfoLoaderPass.cpp index 2f3486cb44..094c107c0a 100644 --- a/lib/Analysis/ProfileInfoLoaderPass.cpp +++ b/lib/Analysis/ProfileInfoLoaderPass.cpp @@ -17,9 +17,10 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/ProfileInfo.h" #include "llvm/Analysis/ProfileInfoLoader.h" -#include "llvm/BasicBlock.h" -#include "llvm/InstrTypes.h" -#include "llvm/Module.h" +#include "llvm/IR/BasicBlock.h" +#include "llvm/IR/InstrTypes.h" +#include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Module.h" #include "llvm/Pass.h" #include "llvm/Support/CFG.h" #include "llvm/Support/CommandLine.h" @@ -170,8 +171,8 @@ bool LoaderPass::runOnModule(Module &M) { } } if (ReadCount != Counters.size()) { - errs() << "WARNING: profile information is inconsistent with " - << "the current program!\n"; + M.getContext().emitWarning("profile information is inconsistent " + "with the current program"); } NumEdgesRead = ReadCount; } @@ -218,8 +219,8 @@ bool LoaderPass::runOnModule(Module &M) { } } if (ReadCount != Counters.size()) { - errs() << "WARNING: profile information is inconsistent with " - << "the current program!\n"; + M.getContext().emitWarning("profile information is inconsistent " + "with the current program"); } NumEdgesRead = ReadCount; } @@ -239,8 +240,8 @@ bool LoaderPass::runOnModule(Module &M) { BlockInformation[F][BB] = (double)Counters[ReadCount++]; } if (ReadCount != Counters.size()) { - errs() << "WARNING: profile information is inconsistent with " - << "the current program!\n"; + M.getContext().emitWarning("profile information is inconsistent " + "with the current program"); } } @@ -258,8 +259,8 @@ bool LoaderPass::runOnModule(Module &M) { FunctionInformation[F] = (double)Counters[ReadCount++]; } if (ReadCount != Counters.size()) { - errs() << "WARNING: profile information is inconsistent with " - << "the current program!\n"; + M.getContext().emitWarning("profile information is inconsistent " + "with the current program"); } } |