[llvm-commits] CVS: llvm-java/lib/ClassFile/ClassFile.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Tue Jun 29 15:22:01 PDT 2004
Changes in directory llvm-java/lib/ClassFile:
ClassFile.cpp updated: 1.10 -> 1.11
---
Log message:
java.lang.Object does not have a super class so don't throw an
exception when we detect that it doesn't have one.
---
Diffs of the changes: (+6 -3)
Index: llvm-java/lib/ClassFile/ClassFile.cpp
diff -u llvm-java/lib/ClassFile/ClassFile.cpp:1.10 llvm-java/lib/ClassFile/ClassFile.cpp:1.11
--- llvm-java/lib/ClassFile/ClassFile.cpp:1.10 Thu May 27 14:37:27 2004
+++ llvm-java/lib/ClassFile/ClassFile.cpp Tue Jun 29 15:21:34 2004
@@ -156,7 +156,7 @@
throw ClassFileSemanticError(
"Representation of this class is not of type ConstantClass");
superClass_ = dynamic_cast<ConstantClass*>(cPool_[readU2(is)]);
- if (!superClass_)
+ if (!superClass_ && thisClass_->getName()->str() != "java/lang/Object")
throw ClassFileSemanticError(
"Representation of super class is not of type ConstantClass");
readClasses(interfaces_, cPool_, is);
@@ -177,8 +177,11 @@
{
os << "Minor version: " << getMinorVersion() << '\n'
<< "Major version: " << getMajorVersion() << "\n\n"
- << "class " << *getThisClass() << " (" << *getSuperClass() << ")\n"
- << "Flags:";
+ << "class " << *getThisClass();
+ if (getSuperClass())
+ os << " (" << *getSuperClass() << ")\n";
+
+ os << "Flags:";
if (isPublic()) os << " public";
if (isFinal()) os << " final";
if (isSuper()) os << " super";
More information about the llvm-commits
mailing list