Mercurial > projects > ldc
comparison gen/classes.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 | 1d5c3354b3c2 |
children | e4f7b5d9c68a |
comparison
equal
deleted
inserted
replaced
1570:ab03cfb3a212 | 1571:8d086d552909 |
---|---|
628 // if no destructor emit a null | 628 // if no destructor emit a null |
629 if (!dtor) | 629 if (!dtor) |
630 return getNullPtr(getVoidPtrType()); | 630 return getNullPtr(getVoidPtrType()); |
631 | 631 |
632 dtor->codegen(Type::sir); | 632 dtor->codegen(Type::sir); |
633 return llvm::ConstantExpr::getBitCast(dtor->ir.irFunc->func, getPtrToType(LLType::Int8Ty)); | 633 return llvm::ConstantExpr::getBitCast(dtor->ir.irFunc->func, getPtrToType(LLType::getInt8Ty(gIR->context()))); |
634 } | 634 } |
635 | 635 |
636 static unsigned build_classinfo_flags(ClassDeclaration* cd) | 636 static unsigned build_classinfo_flags(ClassDeclaration* cd) |
637 { | 637 { |
638 // adapted from original dmd code | 638 // adapted from original dmd code |