comparison ir/irtypeclass.cpp @ 1571:8d086d552909

IntegerType is now contextifed. Requires llvm >= 78969. resistor says this will be the last context API change :)
author Benjamin Kramer <benny.kra@gmail.com>
date Fri, 14 Aug 2009 00:39:18 +0200
parents 755abafbf25d
children
comparison
equal deleted inserted replaced
1570:ab03cfb3a212 1571:8d086d552909
21 21
22 IrTypeClass::IrTypeClass(ClassDeclaration* cd) 22 IrTypeClass::IrTypeClass(ClassDeclaration* cd)
23 : IrTypeAggr(cd), 23 : IrTypeAggr(cd),
24 cd(cd), 24 cd(cd),
25 tc((TypeClass*)cd->type), 25 tc((TypeClass*)cd->type),
26 vtbl_pa(llvm::OpaqueType::get()) 26 vtbl_pa(llvm::OpaqueType::get(gIR->context()))
27 { 27 {
28 vtbl_size = cd->vtbl.dim; 28 vtbl_size = cd->vtbl.dim;
29 num_interface_vtbls = 0; 29 num_interface_vtbls = 0;
30 } 30 }
31 31
232 } 232 }
233 // classes have monitor and fields 233 // classes have monitor and fields
234 else 234 else
235 { 235 {
236 // add monitor 236 // add monitor
237 defaultTypes.push_back(llvm::PointerType::get(llvm::Type::Int8Ty, 0)); 237 defaultTypes.push_back(llvm::PointerType::get(llvm::Type::getInt8Ty(gIR->context()), 0));
238 238
239 // we start right after the vtbl and monitor 239 // we start right after the vtbl and monitor
240 size_t offset = PTRSIZE * 2; 240 size_t offset = PTRSIZE * 2;
241 size_t field_index = 2; 241 size_t field_index = 2;
242 242