[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Fri Dec 3 18:04:46 PST 2004



Changes in directory llvm-java/lib/Compiler:

Compiler.cpp updated: 1.153 -> 1.154
---
Log message:

Cast to correct type (pointer to llvm_base_obj) when calling an
interface or virtual method.


---
Diffs of the changes:  (+4 -2)

Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.153 llvm-java/lib/Compiler/Compiler.cpp:1.154
--- llvm-java/lib/Compiler/Compiler.cpp:1.153	Fri Dec  3 20:01:38 2004
+++ llvm-java/lib/Compiler/Compiler.cpp	Fri Dec  3 20:04:35 2004
@@ -2053,7 +2053,8 @@
       objRef = new CastInst(objRef, PointerType::get(ci->type),
                             "this", currentBB_);
       Value* objBase =
-        new CastInst(objRef, ClassInfo::ObjectBaseTy, TMP, currentBB_);
+        new CastInst(objRef, PointerType::get(ClassInfo::ObjectBaseTy),
+                     TMP, currentBB_);
       Function* f = module_.getOrInsertFunction(
         LLVM_JAVA_GETOBJECTCLASS, PointerType::get(VTableInfo::VTableTy),
         objBase->getType(), NULL);
@@ -2122,7 +2123,8 @@
       objRef = new CastInst(objRef, PointerType::get(ci->type),
                             "this", currentBB_);
       Value* objBase =
-        new CastInst(objRef, ClassInfo::ObjectBaseTy, TMP, currentBB_);
+        new CastInst(objRef, PointerType::get(ClassInfo::ObjectBaseTy),
+                     TMP, currentBB_);
       Function* f = module_.getOrInsertFunction(
         LLVM_JAVA_GETOBJECTCLASS, PointerType::get(VTableInfo::VTableTy),
         objBase->getType(), NULL);






More information about the llvm-commits mailing list