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

Alkis Evlogimenos alkis at cs.uiuc.edu
Sun Dec 5 17:00:57 PST 2004



Changes in directory llvm-java/lib/Compiler:

Compiler.cpp updated: 1.167 -> 1.168
---
Log message:

Fix virtual function calls.


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

Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.167 llvm-java/lib/Compiler/Compiler.cpp:1.168
--- llvm-java/lib/Compiler/Compiler.cpp:1.167	Sun Dec  5 18:20:11 2004
+++ llvm-java/lib/Compiler/Compiler.cpp	Sun Dec  5 19:00:46 2004
@@ -2091,9 +2091,8 @@
         LLVM_JAVA_GETOBJECTCLASS, PointerType::get(VTableInfo::VTableTy),
         objBase->getType(), NULL);
       Value* vtable = new CallInst(f, objBase, TMP, currentBB_);
-      vtable = new CastInst(vtable, PointerType::get(vi->vtable->getType()),
-                            TMP, currentBB_);
-      vtable = new LoadInst(vtable, className + "<vtable>", currentBB_);
+      vtable = new CastInst(vtable, vi->vtable->getType(),
+                            className + "<vtable>", currentBB_);
       std::vector<Value*> indices(1, ConstantUInt::get(Type::UIntTy, 0));
       assert(vi->m2iMap.find(methodDescr) != vi->m2iMap.end() &&
              "could not find slot for virtual function!");






More information about the llvm-commits mailing list