[llvm-commits] CVS: llvm-java/tools/classdump/classdump.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sat Feb 12 11:06:02 PST 2005
Changes in directory llvm-java/tools/classdump:
classdump.cpp updated: 1.18 -> 1.19
---
Log message:
Implement tableswitch. Fix a bug in newarray.
---
Diffs of the changes: (+8 -2)
classdump.cpp | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Index: llvm-java/tools/classdump/classdump.cpp
diff -u llvm-java/tools/classdump/classdump.cpp:1.18 llvm-java/tools/classdump/classdump.cpp:1.19
--- llvm-java/tools/classdump/classdump.cpp:1.18 Fri Feb 11 21:01:37 2005
+++ llvm-java/tools/classdump/classdump.cpp Sat Feb 12 13:05:16 2005
@@ -499,7 +499,12 @@
/// @brief called on RET
void do_ret(unsigned index) { abort(); }
/// @brief called on TABLESWITCH
- void do_tableswitch(unsigned defTarget, const SwitchCases& sw) { abort(); }
+ void do_tableswitch(unsigned defTarget, const SwitchCases& sw) {
+ Out << "tableswitch{ //" << sw.front().first << " to " << sw.back().first;
+ for (unsigned i = 0, e = sw.size(); i != e; ++i)
+ Out << "\n\t\t\t" << sw[i].first << ": " << sw[i].second << ';';
+ Out << ";\n\t\t\tdefault: " << defTarget << " }";
+ }
/// @brief called on LOOKUPSWITCH
void do_lookupswitch(unsigned defTarget, const SwitchCases& sw) { abort(); }
/// @brief called on IRETURN
@@ -566,7 +571,8 @@
case BOOLEAN: Out << "boolean"; break;
case CHAR: Out << "char"; break;
case FLOAT: Out << "float"; break;
- case DOUBLE: Out << "byte"; break;
+ case DOUBLE: Out << "double"; break;
+ case BYTE: Out << "byte"; break;
case SHORT: Out << "short"; break;
case INT: Out << "int"; break;
case LONG: Out << "long"; break;
More information about the llvm-commits
mailing list