[svn r74] Fixed passing types with different alignment to D-style variadic functions.

Fixed casting integer to pointer.
This commit is contained in:
Tomas Lindquist Olsen
2007-10-28 19:33:50 +01:00
parent 58b6fc972a
commit 449db38d75
3 changed files with 42 additions and 2 deletions
+3
View File
@@ -1287,6 +1287,9 @@ elem* CastExp::toElem(IRState* p)
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);
}