Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
69:2b5a2eaa88be | 70:fb265a6efea1 |
---|---|
1284 e->val = new llvm::UIToFPInst(u->getValue(), tolltype, "tmp", p->scopebb()); | 1284 e->val = new llvm::UIToFPInst(u->getValue(), tolltype, "tmp", p->scopebb()); |
1285 } | 1285 } |
1286 else { | 1286 else { |
1287 e->val = new llvm::SIToFPInst(u->getValue(), tolltype, "tmp", p->scopebb()); | 1287 e->val = new llvm::SIToFPInst(u->getValue(), tolltype, "tmp", p->scopebb()); |
1288 } | 1288 } |
1289 } | |
1290 else if (totype->ty == Tpointer) { | |
1291 e->val = p->ir->CreateIntToPtr(u->getValue(), tolltype, "tmp"); | |
1289 } | 1292 } |
1290 else { | 1293 else { |
1291 assert(0); | 1294 assert(0); |
1292 } | 1295 } |
1293 //e->storeVal = u->storeVal ? u->storeVal : u->val; | 1296 //e->storeVal = u->storeVal ? u->storeVal : u->val; |