[llvm-commits] CVS: llvm-java/tools/class2llvm/class2llvm.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Tue Jun 29 14:50:02 PDT 2004
Changes in directory llvm-java/tools/class2llvm:
class2llvm.cpp updated: 1.4 -> 1.5
---
Log message:
Make class2llvm utility take classfile as argument.
---
Diffs of the changes: (+6 -2)
Index: llvm-java/tools/class2llvm/class2llvm.cpp
diff -u llvm-java/tools/class2llvm/class2llvm.cpp:1.4 llvm-java/tools/class2llvm/class2llvm.cpp:1.5
--- llvm-java/tools/class2llvm/class2llvm.cpp:1.4 Sat May 29 03:34:42 2004
+++ llvm-java/tools/class2llvm/class2llvm.cpp Tue Jun 29 14:48:50 2004
@@ -20,11 +20,15 @@
#include <Support/CommandLine.h>
#include <cstddef>
+#include <fstream>
#include <iostream>
#include <memory>
using namespace llvm;
+static cl::opt<std::string>
+InputFilename(cl::Positional, cl::desc("<input bytecode>"), cl::init("-"));
+
int main(int argc, char* argv[])
{
PrintStackTraceOnErrorSignal();
@@ -32,8 +36,8 @@
"classfile to llvm utility");
try {
- std::auto_ptr<Java::ClassFile> cf(
- Java::ClassFile::readClassFile(std::cin));
+ std::ifstream in(InputFilename.c_str());
+ std::auto_ptr<Java::ClassFile> cf(Java::ClassFile::readClassFile(in));
Java::Compiler compiler;
More information about the llvm-commits
mailing list