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

Alkis Evlogimenos alkis at cs.uiuc.edu
Fri Dec 3 18:10:47 PST 2004



Changes in directory llvm-java/lib/Compiler:

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

Cast to correct type (pointer to llvm_base_obj) when performing
checkcast or instanceof functions.


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

Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.154 llvm-java/lib/Compiler/Compiler.cpp:1.155
--- llvm-java/lib/Compiler/Compiler.cpp:1.154	Fri Dec  3 20:04:35 2004
+++ llvm-java/lib/Compiler/Compiler.cpp	Fri Dec  3 20:10:36 2004
@@ -2279,7 +2279,8 @@
 
       Value* objRef = currentOpStack_->pop(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_ISINSTANCEOF, Type::IntTy,
         objBase->getType(), PointerType::get(VTableInfo::VTableTy), NULL);
@@ -2306,7 +2307,8 @@
 
       Value* objRef = currentOpStack_->pop(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_ISINSTANCEOF, Type::IntTy,
         objBase->getType(), PointerType::get(VTableInfo::VTableTy), NULL);






More information about the llvm-commits mailing list