diff gen/toir.cpp @ 379:d632801b15f0

Introducing opaque type to dmd frontent to be used with certain runtime array and aa args and returns. There are still some bugs with aas.
author Christian Kamm <kamm incasoftware de>
date Tue, 22 Jul 2008 23:06:46 +0200
parents d8234836b40f
children 3f98d46e05a4
line wrap: on
line diff
--- a/gen/toir.cpp	Tue Jul 22 19:24:40 2008 +0200
+++ b/gen/toir.cpp	Tue Jul 22 23:06:46 2008 +0200
@@ -1177,6 +1177,10 @@
 
     LLValue* retllval = (retinptr) ? llargs[0] : call->get();
 
+    // if the type of retllval is abstract, refine to concrete
+    if(retllval->getType()->isAbstract())
+        retllval = DtoBitCast(retllval, getPtrToType(DtoType(type)), "retval");
+
     // set calling convention
     if (dfn && dfn->func) {
         int li = dfn->func->llvmInternal;