comparison ir/irtypefunction.cpp @ 1569:755abafbf25d

Push the context through StructType::get. Requires LLVM >= 78258. Also remove old #if's.
author Benjamin Kramer <benny.kra@gmail.com>
date Thu, 06 Aug 2009 01:47:39 +0200
parents 46f6365a50d7
children 8d086d552909
comparison
equal deleted inserted replaced
1568:a591aa6bd6dc 1569:755abafbf25d
37 { 37 {
38 assert(dtype->ty == Tdelegate); 38 assert(dtype->ty == Tdelegate);
39 const LLType* i8ptr = getVoidPtrType(); 39 const LLType* i8ptr = getVoidPtrType();
40 const LLType* func = DtoFunctionType(dtype->nextOf(), NULL, Type::tvoid->pointerTo()); 40 const LLType* func = DtoFunctionType(dtype->nextOf(), NULL, Type::tvoid->pointerTo());
41 const LLType* funcptr = getPtrToType(func); 41 const LLType* funcptr = getPtrToType(func);
42 const LLStructType* dgtype = LLStructType::get(i8ptr, funcptr, NULL); 42 const LLStructType* dgtype = LLStructType::get(gIR->context(), i8ptr, funcptr, NULL);
43 gIR->module->addTypeName(dtype->toChars(), dgtype); 43 gIR->module->addTypeName(dtype->toChars(), dgtype);
44 44
45 llvm::cast<llvm::OpaqueType>(pa.get())->refineAbstractTypeTo(dgtype); 45 llvm::cast<llvm::OpaqueType>(pa.get())->refineAbstractTypeTo(dgtype);
46 return pa.get(); 46 return pa.get();
47 } 47 }