#include "UpgradeInternals.h"
#include "llvm/Module.h"
-#include "llvm/Bytecode/Writer.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Streams.h"
Debug("debug-upgrade-yacc", cl::desc("Print debug output from yacc parser"),
cl::Hidden, cl::init(false));
-static cl::opt<bool>
-EmitByteCode("emit-bytecode", cl::desc("Emit bytecode instead of assembly"),
- cl::init(false));
-
int main(int argc, char **argv) {
llvm_shutdown_obj X; // Call llvm_shutdown() on exit.
cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
Module *M = UpgradeAssembly(InputFilename, *In, Debug, AddAttrs);
if (!M) {
cerr << argv[0] << ": No module returned from assembly parsing\n";
- if (!EmitByteCode)
- *Out << argv[0] << ": parse failed.";
+ *Out << argv[0] << ": parse failed.";
exit(1);
}
// Finally, print the module on the output stream.
- if (EmitByteCode) {
- OStream OS(*Out);
- WriteBytecodeToFile(M, OS);
- } else
- M->print(Out);
+ M->print(Out);
} catch (const std::string& caught_message) {
cerr << argv[0] << ": " << caught_message << "\n";