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

Alkis Evlogimenos alkis at cs.uiuc.edu
Sun Sep 19 15:38:10 PDT 2004



Changes in directory llvm-java/lib/Compiler:

Compiler.cpp updated: 1.105 -> 1.106
---
Log message:

Reserve the correct size of interface vtable pointers for each typeinfo.


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

Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.105 llvm-java/lib/Compiler/Compiler.cpp:1.106
--- llvm-java/lib/Compiler/Compiler.cpp:1.105	Sun Sep 19 17:30:07 2004
+++ llvm-java/lib/Compiler/Compiler.cpp	Sun Sep 19 17:38:00 2004
@@ -523,7 +523,8 @@
         assert(interface->isInterface() &&
                "Class in interfaces list is not an interface!");
         const ClassInfo& interfaceCI = getClassInfo(interface);
-        vtables.resize(interfaceCI.interfaceIdx, nullVTable);
+        if (interfaceCI.interfaceIdx >= vtables.size())
+          vtables.resize(interfaceCI.interfaceIdx+1, nullVTable);
         vtables[interfaceCI.interfaceIdx] = buildInterfaceVTable(cf, interface);
       }
 






More information about the llvm-commits mailing list