Mercurial > projects > ldc
comparison gen/toobj.cpp @ 1560:1d5c3354b3c2
getNullValue is in Constant again
Requires LLVM >= r77721
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Fri, 31 Jul 2009 23:01:29 +0200 |
parents | d6e8d5db259f |
children | c03d164e96d9 |
comparison
equal
deleted
inserted
replaced
1559:06d5cc873350 | 1560:1d5c3354b3c2 |
---|---|
555 LLFunction* ctor = LLFunction::Create(fty, LLGlobalValue::InternalLinkage, fname, gIR->module); | 555 LLFunction* ctor = LLFunction::Create(fty, LLGlobalValue::InternalLinkage, fname, gIR->module); |
556 | 556 |
557 // provide the default initializer | 557 // provide the default initializer |
558 const LLStructType* modulerefTy = DtoModuleReferenceType(); | 558 const LLStructType* modulerefTy = DtoModuleReferenceType(); |
559 std::vector<LLConstant*> mrefvalues; | 559 std::vector<LLConstant*> mrefvalues; |
560 mrefvalues.push_back(gIR->context().getNullValue(modulerefTy->getContainedType(0))); | 560 mrefvalues.push_back(LLConstant::getNullValue(modulerefTy->getContainedType(0))); |
561 mrefvalues.push_back(llvm::ConstantExpr::getBitCast(moduleinfo, modulerefTy->getContainedType(1))); | 561 mrefvalues.push_back(llvm::ConstantExpr::getBitCast(moduleinfo, modulerefTy->getContainedType(1))); |
562 LLConstant* thismrefinit = LLConstantStruct::get(modulerefTy, mrefvalues); | 562 LLConstant* thismrefinit = LLConstantStruct::get(modulerefTy, mrefvalues); |
563 | 563 |
564 // create the ModuleReference node for this module | 564 // create the ModuleReference node for this module |
565 std::string thismrefname = "_D"; | 565 std::string thismrefname = "_D"; |