summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gccld/GenerateCode.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/gccld/GenerateCode.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/gccld/GenerateCode.cpp')
-rw-r--r--llvm/tools/gccld/GenerateCode.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/tools/gccld/GenerateCode.cpp b/llvm/tools/gccld/GenerateCode.cpp
index e28f4c9fcb4..c84c7d36401 100644
--- a/llvm/tools/gccld/GenerateCode.cpp
+++ b/llvm/tools/gccld/GenerateCode.cpp
@@ -27,7 +27,7 @@
#include "llvm/Transforms/Scalar.h"
#include "llvm/Support/SystemUtils.h"
#include "llvm/Support/CommandLine.h"
-
+#include "llvm/Support/Streams.h"
using namespace llvm;
namespace {
@@ -123,10 +123,10 @@ static void RemoveEnv(const char * name, char ** const envp) {
}
static void dumpArgs(const char **args) {
- std::cerr << *args++;
+ llvm_cerr << *args++;
while (*args)
- std::cerr << ' ' << *args++;
- std::cerr << '\n' << std::flush;
+ llvm_cerr << ' ' << *args++;
+ llvm_cerr << '\n' << std::flush;
}
static inline void addPass(PassManager &PM, Pass *P) {
@@ -283,7 +283,8 @@ int llvm::GenerateBytecode(Module *M, int StripLevel, bool Internalize,
Passes.add(createVerifierPass());
// Add the pass that writes bytecode to the output file...
- addPass(Passes, new WriteBytecodePass(Out, false, !NoCompress));
+ llvm_ostream L(*Out);
+ addPass(Passes, new WriteBytecodePass(&L, false, !NoCompress));
// Run our queue of passes all at once now, efficiently.
Passes.run(*M);
OpenPOWER on IntegriCloud