[llvm-commits] CVS: llvm/projects/Stacker/tools/stkrc/stkrc.cpp
Bill Wendling
isanbard at gmail.com
Tue Nov 28 16:20:26 PST 2006
Changes in directory llvm/projects/Stacker/tools/stkrc:
stkrc.cpp updated: 1.11 -> 1.12
---
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: (+6 -5)
stkrc.cpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
Index: llvm/projects/Stacker/tools/stkrc/stkrc.cpp
diff -u llvm/projects/Stacker/tools/stkrc/stkrc.cpp:1.11 llvm/projects/Stacker/tools/stkrc/stkrc.cpp:1.12
--- llvm/projects/Stacker/tools/stkrc/stkrc.cpp:1.11 Fri Aug 18 04:07:54 2006
+++ llvm/projects/Stacker/tools/stkrc/stkrc.cpp Tue Nov 28 18:19:40 2006
@@ -22,11 +22,11 @@
#include "llvm/Bytecode/Writer.h"
#include "llvm/Analysis/Verifier.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Streams.h"
#include "llvm/System/Signals.h"
#include <fstream>
#include <iostream>
#include <memory>
-
using namespace llvm;
static cl::opt<std::string>
@@ -115,7 +115,7 @@
}
if (DumpAsm)
- std::cerr << "Here's the assembly:" << M.get();
+ llvm_cerr << "Here's the assembly:" << M.get();
if (OutputFilename != "") { // Specified an output filename?
if (OutputFilename != "-") { // Not stdout?
@@ -163,14 +163,15 @@
throw std::string("error opening ") + OutputFilename + "!";
}
- WriteBytecodeToFile(M.get(), *Out);
+ llvm_ostream L(*Out);
+ WriteBytecodeToFile(M.get(), L);
} catch (const ParseError &E) {
- std::cerr << argv[0] << ": " << E.getMessage() << "\n";
+ llvm_cerr << argv[0] << ": " << E.getMessage() << "\n";
return 1;
}
}
catch (const std::string& msg ) {
- std::cerr << argv[0] << ": " << msg << "\n";
+ llvm_cerr << argv[0] << ": " << msg << "\n";
return 1;
}
More information about the llvm-commits
mailing list