Mercurial > projects > ldc
comparison ir/irtypeclass.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 | 2292878925f4 |
children | 8d086d552909 |
comparison
equal
deleted
inserted
replaced
1568:a591aa6bd6dc | 1569:755abafbf25d |
---|---|
256 // errors are fatal during codegen | 256 // errors are fatal during codegen |
257 if (global.errors) | 257 if (global.errors) |
258 fatal(); | 258 fatal(); |
259 | 259 |
260 // build the llvm type | 260 // build the llvm type |
261 const llvm::Type* st = llvm::StructType::get(defaultTypes, false); | 261 const llvm::Type* st = llvm::StructType::get(gIR->context(), defaultTypes, false); |
262 | 262 |
263 // refine type | 263 // refine type |
264 llvm::cast<llvm::OpaqueType>(pa.get())->refineAbstractTypeTo(st); | 264 llvm::cast<llvm::OpaqueType>(pa.get())->refineAbstractTypeTo(st); |
265 | 265 |
266 // name type | 266 // name type |
322 | 322 |
323 types.push_back(DtoType(fd->type->pointerTo())); | 323 types.push_back(DtoType(fd->type->pointerTo())); |
324 } | 324 } |
325 | 325 |
326 // build the vtbl llvm type | 326 // build the vtbl llvm type |
327 return llvm::StructType::get(types, false); | 327 return llvm::StructType::get(gIR->context(), types, false); |
328 } | 328 } |
329 | 329 |
330 ////////////////////////////////////////////////////////////////////////////// | 330 ////////////////////////////////////////////////////////////////////////////// |
331 | 331 |
332 const llvm::Type * IrTypeClass::get() | 332 const llvm::Type * IrTypeClass::get() |