Mercurial > projects > ldc
comparison gen/tollvm.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 |
---|---|
723 arg.push_back(DtoBitCast(inst, fn->getFunctionType()->getParamType(0), ".tmp")); | 723 arg.push_back(DtoBitCast(inst, fn->getFunctionType()->getParamType(0), ".tmp")); |
724 // call | 724 // call |
725 llvm::CallInst::Create(fn, arg.begin(), arg.end(), "", gIR->scopebb()); | 725 llvm::CallInst::Create(fn, arg.begin(), arg.end(), "", gIR->scopebb()); |
726 } | 726 } |
727 | 727 |
728 void DtoDeleteInterface(llvm::Value* inst) | |
729 { | |
730 // get runtime function | |
731 llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_delinterface"); | |
732 // build args | |
733 llvm::SmallVector<llvm::Value*,1> arg; | |
734 arg.push_back(DtoBitCast(inst, fn->getFunctionType()->getParamType(0), ".tmp")); | |
735 // call | |
736 llvm::CallInst::Create(fn, arg.begin(), arg.end(), "", gIR->scopebb()); | |
737 } | |
738 | |
728 void DtoDeleteArray(DValue* arr) | 739 void DtoDeleteArray(DValue* arr) |
729 { | 740 { |
730 // get runtime function | 741 // get runtime function |
731 llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_delarray"); | 742 llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_delarray"); |
732 // build args | 743 // build args |