mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 07:34:06 +00:00
Add a new -d argument to dump the internal rep as assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@804 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
46c6371141
commit
164cb69e04
@ -9,6 +9,7 @@
|
||||
#include "llvm/Transforms/Linker.h"
|
||||
#include "llvm/Bytecode/Reader.h"
|
||||
#include "llvm/Bytecode/Writer.h"
|
||||
#include "llvm/Assembly/Writer.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Method.h"
|
||||
@ -20,6 +21,7 @@ cl::StringList InputFilenames("", "Load <arg> files, linking them together",
|
||||
cl::OneOrMore);
|
||||
cl::String OutputFilename("o", "Override output filename", cl::NoFlags, "-");
|
||||
cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false);
|
||||
cl::Flag DumpAsm ("d", "Print assembly as linked", cl::Hidden, false);
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
@ -47,6 +49,9 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
if (DumpAsm)
|
||||
cerr << "Here's the assembly:\n" << Composite.get();
|
||||
|
||||
ostream *Out = &cout; // Default to printing to stdout...
|
||||
if (OutputFilename != "-") {
|
||||
Out = new ofstream(OutputFilename.c_str(),
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "llvm/Transforms/Linker.h"
|
||||
#include "llvm/Bytecode/Reader.h"
|
||||
#include "llvm/Bytecode/Writer.h"
|
||||
#include "llvm/Assembly/Writer.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Method.h"
|
||||
@ -20,6 +21,7 @@ cl::StringList InputFilenames("", "Load <arg> files, linking them together",
|
||||
cl::OneOrMore);
|
||||
cl::String OutputFilename("o", "Override output filename", cl::NoFlags, "-");
|
||||
cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false);
|
||||
cl::Flag DumpAsm ("d", "Print assembly as linked", cl::Hidden, false);
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
@ -47,6 +49,9 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
if (DumpAsm)
|
||||
cerr << "Here's the assembly:\n" << Composite.get();
|
||||
|
||||
ostream *Out = &cout; // Default to printing to stdout...
|
||||
if (OutputFilename != "-") {
|
||||
Out = new ofstream(OutputFilename.c_str(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user