summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2006-11-29 00:19:40 +0000
committerBill Wendling <isanbard@gmail.com>2006-11-29 00:19:40 +0000
commitafd54eb8b63025955fca8c184ab78f7ed75414f7 (patch)
tree9eaaabde78fe455487783cdf40a0bebcb0352b6c /llvm/tools/opt/opt.cpp
parenta531ac291cc4fb65f4d9573d08babf5ce8bd4a9d (diff)
downloadbcm5719-llvm-afd54eb8b63025955fca8c184ab78f7ed75414f7.tar.gz
bcm5719-llvm-afd54eb8b63025955fca8c184ab78f7ed75414f7.zip
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. llvm-svn: 31990
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r--llvm/tools/opt/opt.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index 502118e6588..e43b76ff95f 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -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 @@ int main(int argc, char **argv) {
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());
OpenPOWER on IntegriCloud