comparison gen/toobj.cpp @ 1228:79758fd2f48a

Added Doxygen file. Completely seperated type and symbol generation. Should fix a lot of bugs, but is not yet 100% complete.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Wed, 15 Apr 2009 20:06:25 +0200
parents a6dbd571d417
children fc579f389f9a
comparison
equal deleted inserted replaced
1215:08f87d8cd101 1228:79758fd2f48a
144 144
145 // emit function bodies 145 // emit function bodies
146 sir->emitFunctionBodies(); 146 sir->emitFunctionBodies();
147 147
148 // generate ModuleInfo 148 // generate ModuleInfo
149 genmoduleinfo(); 149 //genmoduleinfo();
150 150
151 // emit usedArray 151 // emit usedArray
152 if (!ir.usedArray.empty()) 152 if (!ir.usedArray.empty())
153 { 153 {
154 const LLArrayType* usedTy = LLArrayType::get(getVoidPtrType(), ir.usedArray.size()); 154 const LLArrayType* usedTy = LLArrayType::get(getVoidPtrType(), ir.usedArray.size());
619 // initializer vector 619 // initializer vector
620 std::vector<LLConstant*> initVec; 620 std::vector<LLConstant*> initVec;
621 LLConstant* c = 0; 621 LLConstant* c = 0;
622 622
623 // vtable 623 // vtable
624 c = moduleinfo->ir.irStruct->vtbl; 624 c = moduleinfo->ir.irStruct->getVtblSymbol();
625 initVec.push_back(c); 625 initVec.push_back(c);
626 626
627 // monitor 627 // monitor
628 c = getNullPtr(getPtrToType(LLType::Int8Ty)); 628 c = getNullPtr(getPtrToType(LLType::Int8Ty));
629 initVec.push_back(c); 629 initVec.push_back(c);
694 { 694 {
695 Logger::println("skipping opaque class declaration '%s' in moduleinfo", cd->toPrettyChars()); 695 Logger::println("skipping opaque class declaration '%s' in moduleinfo", cd->toPrettyChars());
696 continue; 696 continue;
697 } 697 }
698 Logger::println("class: %s", cd->toPrettyChars()); 698 Logger::println("class: %s", cd->toPrettyChars());
699 assert(cd->ir.irStruct->classInfo); 699 c = DtoBitCast(cd->ir.irStruct->getClassInfoSymbol(), getPtrToType(classinfoTy));
700 c = DtoBitCast(cd->ir.irStruct->classInfo, getPtrToType(classinfoTy));
701 classInits.push_back(c); 700 classInits.push_back(c);
702 } 701 }
703 // has class array? 702 // has class array?
704 if (!classInits.empty()) 703 if (!classInits.empty())
705 { 704 {