diff gen/toir.c @ 70:fb265a6efea1 trunk

[svn r74] Fixed passing types with different alignment to D-style variadic functions. Fixed casting integer to pointer.
author lindquist
date Sun, 28 Oct 2007 19:33:50 +0100
parents 2b5a2eaa88be
children d7e764e62462
line wrap: on
line diff
--- a/gen/toir.c	Sun Oct 28 04:23:38 2007 +0100
+++ b/gen/toir.c	Sun Oct 28 19:33:50 2007 +0100
@@ -1287,6 +1287,9 @@
                 e->val = new llvm::SIToFPInst(u->getValue(), tolltype, "tmp", p->scopebb());
             }
         }
+        else if (totype->ty == Tpointer) {
+            e->val = p->ir->CreateIntToPtr(u->getValue(), tolltype, "tmp");
+        }
         else {
             assert(0);
         }