diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-23 06:03:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-23 06:03:38 +0000 |
commit | 45cfe545ec8177262dabc70580ce05feaa1c3880 (patch) | |
tree | d7e42a138f6f8b54e1a831aff3c73c653ee77784 /include/llvm/Analysis | |
parent | cb3e3d30054edfc7481bf323b315da4edc63bc44 (diff) | |
download | external_llvm-45cfe545ec8177262dabc70580ce05feaa1c3880.tar.gz external_llvm-45cfe545ec8177262dabc70580ce05feaa1c3880.tar.bz2 external_llvm-45cfe545ec8177262dabc70580ce05feaa1c3880.zip |
Change Pass::print to take a raw ostream instead of std::ostream,
update all code that this affects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/CallGraph.h | 7 | ||||
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 5 | ||||
-rw-r--r-- | include/llvm/Analysis/FindUsedTypes.h | 3 | ||||
-rw-r--r-- | include/llvm/Analysis/Interval.h | 5 | ||||
-rw-r--r-- | include/llvm/Analysis/IntervalPartition.h | 5 | ||||
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/LoopVR.h | 3 | ||||
-rw-r--r-- | include/llvm/Analysis/PostDominators.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/ScalarEvolution.h | 6 |
9 files changed, 12 insertions, 26 deletions
diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index de839694dc..c36cb22780 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -155,9 +155,7 @@ public: /// void initialize(Module &M); - virtual void print(std::ostream &o, const Module *M) const; - void print(std::ostream *o, const Module *M) const { if (o) print(*o, M); } - void dump() const; + void print(raw_ostream &o, Module *) const; protected: // destroy - Release memory for the call graph @@ -202,8 +200,7 @@ public: /// dump - Print out this call graph node. /// void dump() const; - void print(std::ostream &OS) const; - void print(std::ostream *OS) const { if (OS) print(*OS); } + void print(raw_ostream &OS) const; //===--------------------------------------------------------------------- // Methods to keep a call graph up to date with a function that has been diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 094fecf107..412f8ccf6d 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -22,7 +22,6 @@ #define LLVM_ANALYSIS_DOMINATORS_H #include "llvm/Pass.h" -#include "llvm/BasicBlock.h" #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/ADT/DenseMap.h" @@ -830,7 +829,7 @@ public: DT->releaseMemory(); } - virtual void print(std::ostream &OS, const Module* M= 0) const; + virtual void print(raw_ostream &OS, const Module* M= 0) const; }; //===------------------------------------- @@ -978,7 +977,7 @@ public: /// print - Convert to human readable form /// - virtual void print(std::ostream &OS, const Module* = 0) const; + virtual void print(raw_ostream &OS, const Module* = 0) const; }; diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h index c897af3a58..1337385848 100644 --- a/include/llvm/Analysis/FindUsedTypes.h +++ b/include/llvm/Analysis/FindUsedTypes.h @@ -37,8 +37,7 @@ public: /// passed in, then the types are printed symbolically if possible, using the /// symbol table from the module. /// - void print(std::ostream &o, const Module *M) const; - void print(std::ostream *o, const Module *M) const { if (o) print(*o, M); } + void print(raw_ostream &o, const Module *M) const; private: /// IncorporateType - Incorporate one type and all of its subtypes into the diff --git a/include/llvm/Analysis/Interval.h b/include/llvm/Analysis/Interval.h index 1da2022f69..ca8ad73131 100644 --- a/include/llvm/Analysis/Interval.h +++ b/include/llvm/Analysis/Interval.h @@ -22,11 +22,11 @@ #include "llvm/ADT/GraphTraits.h" #include <vector> -#include <iosfwd> namespace llvm { class BasicBlock; +class raw_ostream; //===----------------------------------------------------------------------===// // @@ -98,8 +98,7 @@ public: bool isLoop() const; /// print - Show contents in human readable format... - void print(std::ostream &O) const; - void print(std::ostream *O) const { if (O) print(*O); } + void print(raw_ostream &O) const; }; /// succ_begin/succ_end - define methods so that Intervals may be used diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h index feae6d82f8..c1214e7427 100644 --- a/include/llvm/Analysis/IntervalPartition.h +++ b/include/llvm/Analysis/IntervalPartition.h @@ -60,10 +60,7 @@ public: IntervalPartition(IntervalPartition &I, bool); // print - Show contents in human readable format... - virtual void print(std::ostream &O, const Module* = 0) const; - void print(std::ostream *O, const Module* M = 0) const { - if (O) print(*O, M); - } + virtual void print(raw_ostream &O, const Module* = 0) const; // getRootInterval() - Return the root interval that contains the starting // block of the function. diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 5435226283..3a09e7b058 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -938,7 +938,7 @@ public: virtual void releaseMemory() { LI.releaseMemory(); } - virtual void print(std::ostream &O, const Module* M = 0) const; + virtual void print(raw_ostream &O, const Module* M = 0) const; virtual void getAnalysisUsage(AnalysisUsage &AU) const; diff --git a/include/llvm/Analysis/LoopVR.h b/include/llvm/Analysis/LoopVR.h index a9f6636d79..3b098e6ca1 100644 --- a/include/llvm/Analysis/LoopVR.h +++ b/include/llvm/Analysis/LoopVR.h @@ -17,7 +17,6 @@ #include "llvm/Pass.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Support/ConstantRange.h" -#include <iosfwd> #include <map> namespace llvm { @@ -33,7 +32,7 @@ public: LoopVR() : FunctionPass(&ID) {} bool runOnFunction(Function &F); - virtual void print(std::ostream &os, const Module *) const; + virtual void print(raw_ostream &os, const Module *) const; void releaseMemory(); void getAnalysisUsage(AnalysisUsage &AU) const; diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index ff579e3c4a..6c9e05fd4b 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -57,7 +57,7 @@ struct PostDominatorTree : public FunctionPass { return DT->properlyDominates(A, B); } - virtual void print(std::ostream &OS, const Module*) const; + virtual void print(raw_ostream &OS, const Module*) const; }; FunctionPass* createPostDomTree(); diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index 558cd011f5..ea25853eda 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -601,11 +601,7 @@ namespace llvm { virtual bool runOnFunction(Function &F); virtual void releaseMemory(); virtual void getAnalysisUsage(AnalysisUsage &AU) const; - void print(raw_ostream &OS, const Module* = 0) const; - virtual void print(std::ostream &OS, const Module* = 0) const; - void print(std::ostream *OS, const Module* M = 0) const { - if (OS) print(*OS, M); - } + virtual void print(raw_ostream &OS, const Module* = 0) const; private: FoldingSet<SCEV> UniqueSCEVs; |