Mercurial > projects > ldc
diff gen/tollvm.cpp @ 705:5a2983f97498
Fixed weird struct problem from downs, see mini/compile_structs1.d
Rewrote DtoIndexStruct/Class , the old implementation were way too complex for what we really need now - since the DotVar changes.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 14 Oct 2008 15:35:49 +0200 |
parents | 06576ece1a1b |
children | 30b42a283c8e |
line wrap: on
line diff
--- a/gen/tollvm.cpp Tue Oct 14 13:21:14 2008 +0200 +++ b/gen/tollvm.cpp Tue Oct 14 15:35:49 2008 +0200 @@ -389,20 +389,6 @@ ////////////////////////////////////////////////////////////////////////////////////////// -LLValue* DtoGEPi(LLValue* ptr, const DStructIndexVector& src, const char* var, llvm::BasicBlock* bb) -{ - size_t n = src.size(); - LLSmallVector<LLValue*, 3> dst(n); - - size_t j=0; - for (DStructIndexVector::const_iterator i=src.begin(); i!=src.end(); ++i) - dst[j++] = DtoConstUint(*i); - - return llvm::GetElementPtrInst::Create(ptr, dst.begin(), dst.end(), var?var:"tmp", bb?bb:gIR->scopebb()); -} - -////////////////////////////////////////////////////////////////////////////////////////// - LLValue* DtoGEPi1(LLValue* ptr, unsigned i, const char* var, llvm::BasicBlock* bb) { return llvm::GetElementPtrInst::Create(ptr, DtoConstUint(i), var?var:"tmp", bb?bb:gIR->scopebb());