aboutsummaryrefslogtreecommitdiff
path: root/projects
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 /projects
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 'projects')
-rw-r--r--projects/Stacker/tools/stkrc/stkrc.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/projects/Stacker/tools/stkrc/stkrc.cpp b/projects/Stacker/tools/stkrc/stkrc.cpp
index 727b044c20..f468330e62 100644
--- a/projects/Stacker/tools/stkrc/stkrc.cpp
+++ b/projects/Stacker/tools/stkrc/stkrc.cpp
@@ -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 @@ int main(int argc, char **argv)
}
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 @@ int main(int argc, char **argv)
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;
}