mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Replacing std::iostreams with llvm iostreams. Some of these changes involve
adding a temporary wrapper around the ostream to make it friendly to functions expecting an LLVM stream. This should be fixed in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31990 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -20,7 +20,7 @@ | ||||
| #include "llvm/Analysis/Passes.h" | ||||
| #include "llvm/Module.h" | ||||
| #include "llvm/Support/Debug.h" | ||||
| #include <iostream> | ||||
| #include <ostream> | ||||
| using namespace llvm; | ||||
|  | ||||
| namespace { | ||||
| @@ -53,6 +53,9 @@ namespace { | ||||
|     } | ||||
|  | ||||
|     // print - Implement the Pass::print method... | ||||
|     void print(llvm_ostream O, const Module *M) const { | ||||
|       if (O.stream()) print(*O.stream(), M); | ||||
|     } | ||||
|     void print(std::ostream &O, const Module *M) const { | ||||
|       assert(ResultGraph && "Result graph has not yet been computed!"); | ||||
|       ResultGraph->writeGraphToFile(O, "steensgaards"); | ||||
| @@ -188,7 +191,7 @@ bool Steens::runOnModule(Module &M) { | ||||
|   // FIXME: We should be able to disable the globals graph for steens! | ||||
|   //ResultGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); | ||||
|  | ||||
|   DEBUG(print(std::cerr, &M)); | ||||
|   print(DOUT, &M); | ||||
|   return false; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user