[llvm-commits] CVS: llvm-java/tools/classdump/Makefile classdump.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Thu Apr 15 16:02:07 PDT 2004


Changes in directory llvm-java/tools/classdump:

Makefile added (r1.1)
classdump.cpp added (r1.1)

---
Log message:

Initial checking of the llvm java-frontend. This contains a skeleton and a preliminary ClassFile parsing library


---
Diffs of the changes:  (+47 -0)

Index: llvm-java/tools/classdump/Makefile
diff -c /dev/null llvm-java/tools/classdump/Makefile:1.1
*** /dev/null	Thu Apr 15 16:01:00 2004
--- llvm-java/tools/classdump/Makefile	Thu Apr 15 16:00:50 2004
***************
*** 0 ****
--- 1,13 ----
+ #===- tools/llc/Makefile ------------------------------*- Makefile -*-===##
+ #
+ #                     The LLVM Compiler Infrastructure
+ #
+ # This file was developed by the LLVM research group and is distributed under
+ # the University of Illinois Open Source License. See LICENSE.TXT for details.
+ #
+ ##===----------------------------------------------------------------------===##
+ LEVEL = ../..
+ TOOLNAME = dumpclass
+ USEDLIBS = classfile
+ 
+ include $(LEVEL)/Makefile.common


Index: llvm-java/tools/classdump/classdump.cpp
diff -c /dev/null llvm-java/tools/classdump/classdump.cpp:1.1
*** /dev/null	Thu Apr 15 16:01:00 2004
--- llvm-java/tools/classdump/classdump.cpp	Thu Apr 15 16:00:50 2004
***************
*** 0 ****
--- 1,34 ----
+ //===-- ClassFile.h - ClassFile support library -----------------*- C++ -*-===//
+ //
+ //                     The LLVM Compiler Infrastructure
+ //
+ // This file was developed by the LLVM research group and is distributed under
+ // the University of Illinois Open Source License. See LICENSE.TXT for details.
+ //
+ //===----------------------------------------------------------------------===//
+ //
+ // This file a sample class reader driver. It is used to drive class
+ // reader tests.
+ //
+ //===----------------------------------------------------------------------===//
+ 
+ #include <llvm/Java/ClassFile.h>
+ 
+ #include <cstddef>
+ #include <iostream>
+ 
+ using namespace llvm;
+ 
+ int main(int argc, char* argv[])
+ {
+     try {
+         Java::ClassFile* cf = Java::ClassFile::readClassFile(std::cin);
+         cf->dump(std::cout);
+     }
+     catch (std::exception& e) {
+         std::cerr << e.what() << '\n';
+         return EXIT_FAILURE;
+     }
+ 
+     return EXIT_SUCCESS;
+ }





More information about the llvm-commits mailing list