comparison gen/tollvm.cpp @ 121:9c79b61fb638 trunk

[svn r125] Renamed/moved a few backend member inside DMD structures for consistency. Unit tests are now implemented.
author lindquist
date Tue, 27 Nov 2007 03:09:36 +0100
parents fd7ad91fd713
children 8096ba7082db
comparison
equal deleted inserted replaced
120:5ce8ab11e75a 121:9c79b61fb638
520 { 520 {
521 const llvm::StructType* structty = isaStruct(_type); 521 const llvm::StructType* structty = isaStruct(_type);
522 TypeStruct* ts = (TypeStruct*)t; 522 TypeStruct* ts = (TypeStruct*)t;
523 assert(ts); 523 assert(ts);
524 assert(ts->sym); 524 assert(ts->sym);
525 assert(ts->sym->llvmInitZ); 525 assert(ts->sym->llvmConstInit);
526 _init = ts->sym->llvmInitZ; 526 _init = ts->sym->llvmConstInit;
527 } 527 }
528 else if (t->ty == Tclass) 528 else if (t->ty == Tclass)
529 { 529 {
530 _init = llvm::Constant::getNullValue(_type); 530 _init = llvm::Constant::getNullValue(_type);
531 } 531 }
1527 { 1527 {
1528 assert(_init->getType()->getContainedType(0) == _type); 1528 assert(_init->getType()->getContainedType(0) == _type);
1529 llvm::GlobalVariable* gv = llvm::cast<llvm::GlobalVariable>(_init); 1529 llvm::GlobalVariable* gv = llvm::cast<llvm::GlobalVariable>(_init);
1530 assert(t->ty == Tstruct); 1530 assert(t->ty == Tstruct);
1531 TypeStruct* ts = (TypeStruct*)t; 1531 TypeStruct* ts = (TypeStruct*)t;
1532 assert(ts->sym->llvmInitZ); 1532 assert(ts->sym->llvmConstInit);
1533 _init = ts->sym->llvmInitZ; 1533 _init = ts->sym->llvmConstInit;
1534 } 1534 }
1535 // array single value init 1535 // array single value init
1536 else if (isaArray(_type)) 1536 else if (isaArray(_type))
1537 { 1537 {
1538 _init = DtoConstStaticArray(_type, _init); 1538 _init = DtoConstStaticArray(_type, _init);