mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
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
This commit is contained in:
1 parent
a5b31ca856
commit
68fe61d6a1
25 files changed
+217
-179
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user