aboutsummaryrefslogtreecommitdiff
path: root/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
commit68fe61d6a165ea6090008e281330895a21607daf (patch)
tree2e0cc1cbd16099aed908dbb3ecda16cf57d04300 /tools/gccld/GenerateCode.cpp
parenta5b31ca85686062408bca0f0a8aa43f9fe58e644 (diff)
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
Diffstat (limited to 'tools/gccld/GenerateCode.cpp')
-rw-r--r--tools/gccld/GenerateCode.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp
index e28f4c9fcb..c84c7d3640 100644
--- a/tools/gccld/GenerateCode.cpp
+++ b/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);