[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Tue Sep 14 11:00:19 PDT 2004
Changes in directory llvm-java/lib/Compiler:
Compiler.cpp updated: 1.96 -> 1.97
---
Log message:
Pass a classfile instance to getClassTypeInfo instead of the classname.
---
Diffs of the changes: (+4 -3)
Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.96 llvm-java/lib/Compiler/Compiler.cpp:1.97
--- llvm-java/lib/Compiler/Compiler.cpp:1.96 Tue Sep 14 00:44:43 2004
+++ llvm-java/lib/Compiler/Compiler.cpp Tue Sep 14 13:00:08 2004
@@ -420,13 +420,14 @@
return ci;
}
- llvm::Constant* getClassTypeInfo(const std::string& className,
+ llvm::Constant* getClassTypeInfo(ClassFile* cf,
const VTableInfo& vi,
const VTableInfo& superVI) const {
// llvm_java_object_typeinfo has four fields: depth, a pointer
// to the superclasses vtable pointers, a count for interfaces
// and a pointer to the interfaces vtable pointers
-
+ const std::string& className = cf->getThisClass()->getName()->str();
+
std::vector<llvm::Constant*> typeInfoInit;
// the depth
unsigned depth = vi.superVtables.size();
@@ -493,7 +494,7 @@
init.push_back(superInit->getOperand(i));
vi.m2iMap = superVI.m2iMap;
// install the new typeinfo block for this class
- init[0] = getClassTypeInfo(className, vi, superVI);
+ init[0] = getClassTypeInfo(cf, vi, superVI);
// add member functions to the vtable
const Methods& methods = cf->getMethods();
More information about the llvm-commits
mailing list