X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FLegacyPassManager.cpp;h=f9fca321fac557ec413cfd7a1d106b8b9cf6f0fa;hb=dfa550a1761a85417d0e42c8cd17cd08e753388b;hp=a431d8256d70bd07864fb392582aa245a6064c6a;hpb=49837ef8111fbeace7ae6379ca733c8f8fa94cfe;p=oota-llvm.git diff --git a/lib/IR/LegacyPassManager.cpp b/lib/IR/LegacyPassManager.cpp index a431d8256d7..f9fca321fac 100644 --- a/lib/IR/LegacyPassManager.cpp +++ b/lib/IR/LegacyPassManager.cpp @@ -12,11 +12,10 @@ //===----------------------------------------------------------------------===// -#include "llvm/Assembly/PrintModulePass.h" -#include "llvm/Assembly/Writer.h" +#include "llvm/IR/IRPrintingPasses.h" #include "llvm/IR/LegacyPassManager.h" -#include "llvm/IR/Module.h" #include "llvm/IR/LegacyPassManagers.h" +#include "llvm/IR/Module.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" @@ -144,7 +143,7 @@ void PassManagerPrettyStackEntry::print(raw_ostream &OS) const { OS << "value"; OS << " '"; - WriteAsOperand(OS, V, /*PrintTy=*/false, M); + V->printAsOperand(OS, /*PrintTy=*/false, M); OS << "'\n"; } @@ -236,7 +235,7 @@ public: /// createPrinterPass - Get a function printer pass. Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const { - return createPrintFunctionPass(Banner, &O); + return createPrintFunctionPass(O, Banner); } // Prepare for running an on the fly pass, freeing memory if needed @@ -305,7 +304,7 @@ public: /// createPrinterPass - Get a module printer pass. Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const { - return createPrintModulePass(&O, false, Banner); + return createPrintModulePass(O, Banner); } /// run - Execute all of the passes scheduled for execution. Keep track of @@ -405,7 +404,7 @@ public: /// createPrinterPass - Get a module printer pass. Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const { - return createPrintModulePass(&O, false, Banner); + return createPrintModulePass(O, Banner); } /// run - Execute all of the passes scheduled for execution. Keep track of @@ -475,7 +474,7 @@ public: } // createTheTimeInfo - This method either initializes the TheTimeInfo pointer - // to a non null value (if the -time-passes option is enabled) or it leaves it + // to a non-null value (if the -time-passes option is enabled) or it leaves it // null. It may be called multiple times. static void createTheTimeInfo(); @@ -1755,7 +1754,7 @@ EnableTiming("time-passes", cl::location(TimePassesIsEnabled), cl::desc("Time each pass, printing elapsed time for each on exit")); // createTheTimeInfo - This method either initializes the TheTimeInfo pointer to -// a non null value (if the -time-passes option is enabled) or it leaves it +// a non-null value (if the -time-passes option is enabled) or it leaves it // null. It may be called multiple times. void TimingInfo::createTheTimeInfo() { if (!TimePassesIsEnabled || TheTimeInfo) return;