llvm.org GIT mirror llvm / b5ebf15
Added a temporary hack to get the llvm-streams to work for future checkins. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31978 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 13 years ago
14 changed file(s) with 114 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
2424 #ifndef LLVM_ADT_BITSETVECTOR_H
2525 #define LLVM_ADT_BITSETVECTOR_H
2626
27 #include "llvm/Support/Streams.h"
2728 #include
2829 #include
2930 #include
172173 ///
173174 /// Printing and debugging support
174175 ///
176 void print(llvm_ostream &O) const {
177 if (O.stream()) print(*O.stream());
178 }
175179 void print(std::ostream &O) const;
176180 void dump() const { print(std::cerr); }
177181
247251 O << "<" << (*I) << ">" << (I+1 == E? "\n" : ", ");
248252 }
249253
254 inline llvm_ostream& operator<< (llvm_ostream& O, const BitSetVector& bset) {
255 bset.print(O);
256 return O;
257 }
250258 inline std::ostream& operator<< (std::ostream& O, const BitSetVector& bset)
251259 {
252260 bset.print(O);
1717 #define LLVM_ANALYSIS_ALIASSETTRACKER_H
1818
1919 #include "llvm/Support/CallSite.h"
20 #include "llvm/Support/Streams.h"
2021 #include "llvm/ADT/iterator"
2122 #include "llvm/ADT/hash_map"
2223 #include "llvm/ADT/ilist"
154155 iterator end() const { return iterator(); }
155156 bool empty() const { return PtrList == 0; }
156157
158 void print(llvm_ostream &OS) const {
159 if (OS.stream()) print(*OS.stream());
160 }
157161 void print(std::ostream &OS) const;
158162 void dump() const;
159163
243247 bool aliasesCallSite(CallSite CS, AliasAnalysis &AA) const;
244248 };
245249
250 inline llvm_ostream& operator<<(llvm_ostream &OS, const AliasSet &AS) {
251 AS.print(OS);
252 return OS;
253 }
246254 inline std::ostream& operator<<(std::ostream &OS, const AliasSet &AS) {
247255 AS.print(OS);
248256 return OS;
352360 iterator begin() { return AliasSets.begin(); }
353361 iterator end() { return AliasSets.end(); }
354362
363 void print(llvm_ostream &OS) const {
364 if (OS.stream()) print(*OS.stream());
365 }
355366 void print(std::ostream &OS) const;
356367 void dump() const;
357368
378389 AliasSet *findAliasSetForCallSite(CallSite CS);
379390 };
380391
392 inline llvm_ostream& operator<<(llvm_ostream &OS, const AliasSetTracker &AST) {
393 AST.print(OS);
394 return OS;
395 }
381396 inline std::ostream& operator<<(std::ostream &OS, const AliasSetTracker &AST) {
382397 AST.print(OS);
383398 return OS;
2121 #define LLVM_ANALYSIS_SCALAREVOLUTION_H
2222
2323 #include "llvm/Pass.h"
24 #include "llvm/Support/Streams.h"
2425 #include
2526
2627 namespace llvm {
9596 /// print - Print out the internal representation of this scalar to the
9697 /// specified stream. This should really only be used for debugging
9798 /// purposes.
99 void print(llvm_ostream &OS) const {
100 if (OS.stream()) print(*OS.stream());
101 }
98102 virtual void print(std::ostream &OS) const = 0;
99103
100104 /// dump - This method is used for debugging.
102106 void dump() const;
103107 };
104108
109 inline llvm_ostream &operator<<(llvm_ostream &OS, const SCEV &S) {
110 S.print(OS);
111 return OS;
112 }
105113 inline std::ostream &operator<<(std::ostream &OS, const SCEV &S) {
106114 S.print(OS);
107115 return OS;
119127 virtual bool isLoopInvariant(const Loop *L) const;
120128 virtual const Type *getType() const;
121129 virtual bool hasComputableLoopEvolution(const Loop *L) const;
130 void print(llvm_ostream &OS) const {
131 if (OS.stream()) print(*OS.stream());
132 }
122133 virtual void print(std::ostream &OS) const;
123134 virtual SCEVHandle
124135 replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
230241 virtual bool runOnFunction(Function &F);
231242 virtual void releaseMemory();
232243 virtual void getAnalysisUsage(AnalysisUsage &AU) const;
244 void print(llvm_ostream &OS, const Module* = 0) const {
245 if (OS.stream()) print(*OS.stream());
246 }
233247 virtual void print(std::ostream &OS, const Module* = 0) const;
234248 };
235249 }
2121 #include "llvm/Bytecode/Format.h"
2222 #include
2323 #include
24 #include <iostream>
24 #include <ostream>
2525
2626 namespace llvm {
2727
5959 private:
6060 LiveRange(); // DO NOT IMPLEMENT
6161 };
62
6263 std::ostream& operator<<(std::ostream& os, const LiveRange &LR);
64 inline llvm_ostream& operator<<(llvm_ostream& os, const LiveRange &LR) {
65 if (os.stream()) *os.stream() << LR;
66 return os;
67 }
6368
6469 inline bool operator<(unsigned V, const LiveRange &LR) {
6570 return V < LR.start;
272277 }
273278
274279 inline std::ostream &operator<<(std::ostream &OS, const LiveInterval &LI) {
275 llvm_ostream L(OS);
276 L << LI;
280 LI.print(OS);
277281 return OS;
278282 }
279283 }
1616 #include "llvm/CodeGen/MachineInstr.h"
1717 #include "llvm/ADT/GraphTraits.h"
1818 #include "llvm/ADT/ilist"
19 #include "llvm/Support/Streams.h"
1920
2021 namespace llvm {
2122 class MachineFunction;
187188
188189 // Debugging methods.
189190 void dump() const;
191 void print(llvm_ostream &OS) const {
192 if (OS.stream()) print(*OS.stream());
193 }
190194 void print(std::ostream &OS) const;
191195
192196 /// getNumber - MachineBasicBlocks are uniquely numbered at the function
221225 };
222226
223227 std::ostream& operator<<(std::ostream &OS, const MachineBasicBlock &MBB);
224
228 inline llvm_ostream& operator<<(llvm_ostream &OS, const MachineBasicBlock &MBB){
229 if (OS.stream()) *OS.stream() << MBB;
230 return OS;
231 }
225232
226233 //===--------------------------------------------------------------------===//
227234 // GraphTraits specializations for machine basic block graphs (machine-CFGs)
1616
1717 #include "llvm/ADT/FoldingSet.h"
1818 #include "llvm/CodeGen/SelectionDAGNodes.h"
19 #include "llvm/Support/Streams.h"
1920 #include
2021 #include
2122
4748
4849 /// print - Implement operator<<...
4950 ///
51 void print(llvm_ostream &O) const {
52 if (O.stream()) print(*O.stream());
53 }
5054 virtual void print(std::ostream &O) const = 0;
5155 };
5256
57 inline llvm_ostream &operator<<(llvm_ostream &OS,
58 const MachineConstantPoolValue &V) {
59 V.print(OS);
60 return OS;
61 }
5362 inline std::ostream &operator<<(std::ostream &OS,
5463 const MachineConstantPoolValue &V) {
5564 V.print(OS);
133142 /// print - Used by the MachineFunction printer to print information about
134143 /// constant pool objects. Implemented in MachineFunction.cpp
135144 ///
145 void print(llvm_ostream &OS) const {
146 if (OS.stream()) print(*OS.stream());
147 }
136148 void print(std::ostream &OS) const;
137149
138150 /// dump - Call print(std::cerr) to be called from the debugger.
1717
1818 #include "llvm/ADT/iterator"
1919 #include "llvm/Support/DataTypes.h"
20 #include "llvm/Support/Streams.h"
2021 #include
2122 #include
2223 #include
283284 IsDead = false;
284285 }
285286
287 friend llvm_ostream& operator<<(llvm_ostream& os, const MachineOperand& mop) {
288 if (os.stream()) *os.stream() << mop;
289 return os;
290 }
286291 friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop);
287292
288293 friend class MachineInstr;
399404 //
400405 // Debugging support
401406 //
407 void print(llvm_ostream &OS, const TargetMachine *TM) const {
408 if (OS.stream()) print(*OS.stream(), TM);
409 }
402410 void print(std::ostream &OS, const TargetMachine *TM) const;
403411 void dump() const;
412 friend llvm_ostream& operator<<(llvm_ostream& os, const MachineInstr& minstr){
413 if (os.stream()) *os.stream() << minstr;
414 return os;
415 }
404416 friend std::ostream& operator<<(std::ostream& os, const MachineInstr& minstr);
405417
406418 //===--------------------------------------------------------------------===//
1616
1717 #include "llvm/Value.h"
1818 #include "llvm/ADT/iterator"
19 #include "llvm/Support/Streams.h"
1920 #include
2021
2122 namespace llvm {
6869 void dump(int indent=0) const;
6970
7071 // Debugging support
72 void print(llvm_ostream &os) const {
73 if (os.stream()) print(*os.stream());
74 }
7175 virtual void print(std::ostream &os) const = 0;
7276
7377 protected:
9195 };
9296
9397 // ostream << operator for SchedGraphNode class
98 inline llvm_ostream &operator<<(llvm_ostream &os,
99 const SchedGraphNodeCommon &node) {
100 node.print(os);
101 return os;
102 }
94103 inline std::ostream &operator<<(std::ostream &os,
95104 const SchedGraphNodeCommon &node) {
96105 node.print(os);
97106 return os;
98107 }
99
100
101
102108
103109 //
104110 // SchedGraphEdge - Edge class to represent dependencies
181187
182188 public:
183189 // Debugging support
190 void print(llvm_ostream &os) const {
191 if (os.stream()) print(*os.stream());
192 }
184193 void print(std::ostream &os) const;
185194 void dump(int indent=0) const;
186195
190199 };
191200
192201 // ostream << operator for SchedGraphNode class
202 inline llvm_ostream &operator<<(llvm_ostream &os, const SchedGraphEdge &edge) {
203 edge.print(os);
204 return os;
205 }
193206 inline std::ostream &operator<<(std::ostream &os, const SchedGraphEdge &edge) {
194207 edge.print(os);
195208 return os;
294294 /// @{
295295 public:
296296 /// Print the module to an output stream
297 void print(llvm_ostream &OS) const {
298 if (OS.stream()) print(*OS.stream(), 0);
299 }
297300 void print(std::ostream &OS) const { print(OS, 0); }
298301 /// Print the module to an output stream with AssemblyAnnotationWriter.
302 void print(llvm_ostream &OS, AssemblyAnnotationWriter *AAW) const {
303 if (OS.stream()) print(*OS.stream(), AAW);
304 }
299305 void print(std::ostream &OS, AssemblyAnnotationWriter *AAW) const;
300306 /// Dump the module to std::cerr (for debugging).
301307 void dump() const;
2828 #ifndef LLVM_PASS_H
2929 #define LLVM_PASS_H
3030
31 #include "llvm/Support/Streams.h"
3132 #include
3233 #include
3334 #include
99100 /// provide the Module* in case the analysis doesn't need it it can just be
100101 /// ignored.
101102 ///
103 void print(llvm_ostream &O, const Module *M) const {
104 if (O.stream()) print(*O.stream(), M);
105 }
102106 virtual void print(std::ostream &O, const Module *M) const;
103107 void dump() const; // dump - call print(std::cerr, 0);
104108
2424 #define LLVM_SUPPORT_CONSTANT_RANGE_H
2525
2626 #include "llvm/Support/DataTypes.h"
27 #include "llvm/Support/Streams.h"
2728 #include
2829
2930 namespace llvm {
139140
140141 /// print - Print out the bounds to a stream...
141142 ///
143 void print(llvm_ostream &OS) const {
144 if (OS.stream()) print(*OS.stream());
145 }
142146 void print(std::ostream &OS) const;
143147
144148 /// dump - Allow printing from a debugger easily...
1313 #include "llvm/AbstractTypeUser.h"
1414 #include "llvm/Support/Casting.h"
1515 #include "llvm/Support/DataTypes.h"
16 #include "llvm/Support/Streams.h"
1617 #include "llvm/ADT/GraphTraits.h"
1718 #include "llvm/ADT/iterator"
1819 #include
134135 ///
135136 mutable std::vector AbstractTypeUsers;
136137 public:
138 void print(llvm_ostream &O) const {
139 if (O.stream()) print(*O.stream());
140 }
137141 void print(std::ostream &O) const;
138142
139143 /// @brief Debugging support: print to stderr
1717 #include "llvm/AbstractTypeUser.h"
1818 #include "llvm/Use.h"
1919 #include "llvm/Support/Casting.h"
20 #include "llvm/Support/Streams.h"
2021 #include
2122
2223 namespace llvm {
7374
7475 /// print - Implement operator<< on Value...
7576 ///
77 void print(llvm_ostream &O) const {
78 if (O.stream()) print(*O.stream());
79 }
7680 virtual void print(std::ostream &O) const = 0;
7781
7882 /// All values are typed, get the type of this value.