Changes in directory llvm/tools/opt:

opt.cpp updated: 1.120 -> 1.121
---
Log message:

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.


---
Diffs of the changes:  (+5 -2)

 opt.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


Index: llvm/tools/opt/opt.cpp
diff -u llvm/tools/opt/opt.cpp:1.120 llvm/tools/opt/opt.cpp:1.121
--- llvm/tools/opt/opt.cpp:1.120        Tue Nov 28 17:33:06 2006
+++ llvm/tools/opt/opt.cpp      Tue Nov 28 18:19:40 2006
@@ -28,6 +28,7 @@
 #include "llvm/Support/Timer.h"
 #include "llvm/LinkAllPasses.h"
 #include "llvm/LinkAllVMCore.h"
+#include <iostream>
 #include <fstream>
 #include <memory>
 #include <algorithm>
@@ -251,8 +252,10 @@
       Passes.add(createVerifierPass());
 
     // Write bytecode out to disk or cout as the last step...
-    if (!NoOutput && !AnalyzeOnly)
-      Passes.add(new WriteBytecodePass(Out, Out != &std::cout, !NoCompress));
+    if (!NoOutput && !AnalyzeOnly) {
+      llvm_ostream L(*Out);
+      Passes.add(new WriteBytecodePass(&L, Out != &std::cout, !NoCompress));
+    }
 
     // Now that we have all of the passes ready, run them.
     Passes.run(*M.get());



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to