comparison gen/tollvm.cpp @ 1050:32ead42679d1

Fix a bug in the X86 ABI. The size of a struct is different from the size of a pointer to that struct...
author Frits van Bommel <fvbommel wxs.nl>
date Fri, 06 Mar 2009 21:15:13 +0100
parents 9167d492cbc2
children f0b6549055ab
comparison
equal deleted inserted replaced
1049:afe271b0e271 1050:32ead42679d1
576 576
577 LLValue* DtoBitCast(LLValue* v, const LLType* t, const char* name) 577 LLValue* DtoBitCast(LLValue* v, const LLType* t, const char* name)
578 { 578 {
579 if (v->getType() == t) 579 if (v->getType() == t)
580 return v; 580 return v;
581 assert(!(isaStruct(t) || isaStruct(v->getType()))); 581 assert(!isaStruct(t));
582 return gIR->ir->CreateBitCast(v, t, name ? name : "tmp"); 582 return gIR->ir->CreateBitCast(v, t, name ? name : "tmp");
583 } 583 }
584 584
585 LLConstant* DtoBitCast(LLConstant* v, const LLType* t) 585 LLConstant* DtoBitCast(LLConstant* v, const LLType* t)
586 { 586 {