comparison gen/tocall.cpp @ 1545:7fcb72d518f6

More factory methods moved to LLVMContext
author Benjamin Kramer <benny.kra@gmail.com>
date Wed, 15 Jul 2009 18:09:41 +0200
parents ad7f2f1862d6
children d6e8d5db259f
comparison
equal deleted inserted replaced
1544:8863cf7236e6 1545:7fcb72d518f6
205 // put data in d-array 205 // put data in d-array
206 std::vector<LLConstant*> pinits; 206 std::vector<LLConstant*> pinits;
207 pinits.push_back(DtoConstSize_t(vtype->getNumElements())); 207 pinits.push_back(DtoConstSize_t(vtype->getNumElements()));
208 pinits.push_back(llvm::ConstantExpr::getBitCast(typeinfomem, getPtrToType(typeinfotype))); 208 pinits.push_back(llvm::ConstantExpr::getBitCast(typeinfomem, getPtrToType(typeinfotype)));
209 const LLType* tiarrty = DtoType(Type::typeinfo->type->arrayOf()); 209 const LLType* tiarrty = DtoType(Type::typeinfo->type->arrayOf());
210 tiinits = llvm::ConstantStruct::get(pinits); 210 tiinits = gIR->context().getConstantStruct(pinits);
211 LLValue* typeinfoarrayparam = new llvm::GlobalVariable(*gIR->module, tiarrty, 211 LLValue* typeinfoarrayparam = new llvm::GlobalVariable(*gIR->module, tiarrty,
212 true, llvm::GlobalValue::InternalLinkage, tiinits, "._arguments.array"); 212 true, llvm::GlobalValue::InternalLinkage, tiinits, "._arguments.array");
213 213
214 llvm::AttributeWithIndex Attr; 214 llvm::AttributeWithIndex Attr;
215 // specify arguments 215 // specify arguments