Mercurial > projects > ldc
comparison gen/classes.cpp @ 210:1d6cfdbc97f0 trunk
[svn r226] Fixed: deleting interface.
Removed: unused util function for calling class destructors.
author | lindquist |
---|---|
date | Wed, 14 May 2008 02:00:23 +0200 |
parents | c4c9b4ac021b |
children | 7816aafeea3c |
comparison
equal
deleted
inserted
replaced
209:c4c9b4ac021b | 210:1d6cfdbc97f0 |
---|---|
917 return new DImValue(type, call, false); | 917 return new DImValue(type, call, false); |
918 } | 918 } |
919 | 919 |
920 ////////////////////////////////////////////////////////////////////////////////////////// | 920 ////////////////////////////////////////////////////////////////////////////////////////// |
921 | 921 |
922 void DtoCallClassDtors(TypeClass* tc, llvm::Value* instance) | |
923 { | |
924 Array* arr = &tc->sym->dtors; | |
925 for (size_t i=0; i<arr->dim; i++) | |
926 { | |
927 FuncDeclaration* fd = (FuncDeclaration*)arr->data[i]; | |
928 assert(fd->ir.irFunc->func); | |
929 llvm::CallInst::Create(fd->ir.irFunc->func, instance, "", gIR->scopebb()); | |
930 } | |
931 } | |
932 | |
933 ////////////////////////////////////////////////////////////////////////////////////////// | |
934 | |
935 void DtoFinalizeClass(llvm::Value* inst) | 922 void DtoFinalizeClass(llvm::Value* inst) |
936 { | 923 { |
937 // get runtime function | 924 // get runtime function |
938 llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_callfinalizer"); | 925 llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_callfinalizer"); |
939 // build args | 926 // build args |