diff gen/toir.cpp @ 193:aca17e55b7a5 trunk

[svn r209] Fixed: exotic array to pointer casts were broken. Changed: classes now have opaque vtables.
author lindquist
date Mon, 12 May 2008 18:44:11 +0200
parents 3cdf4b0c75a1
children bfcb657756f6
line wrap: on
line diff
--- a/gen/toir.cpp	Mon May 12 18:22:55 2008 +0200
+++ b/gen/toir.cpp	Mon May 12 18:44:11 2008 +0200
@@ -1474,6 +1474,10 @@
             funcval = new llvm::LoadInst(funcval,"tmp",p->scopebb());
             funcval = DtoGEP(funcval, zero, vtblidx, toChars(), p->scopebb());
             funcval = new llvm::LoadInst(funcval,"tmp",p->scopebb());
+        #if OPAQUE_VTBLS
+            funcval = DtoBitCast(funcval, getPtrToType(DtoType(fdecl->type)));
+            Logger::cout() << "funcval casted: " << *funcval << '\n';
+        #endif
             //assert(funcval->getType() == DtoType(fdecl->type));
             //cc = DtoCallingConv(fdecl->linkage);
         }