Mercurial > projects > ldc
comparison gen/functions.cpp @ 129:8096ba7082db trunk
[svn r133] Fixed some problems with inlining not happening :P
Fixed problems with certain cases of deeply nested classes/functions.
author | lindquist |
---|---|
date | Fri, 28 Dec 2007 22:55:24 +0100 |
parents | facc562f5674 |
children | 5825d48b27d1 |
comparison
equal
deleted
inserted
replaced
128:e5fe8521bbfa | 129:8096ba7082db |
---|---|
538 else { | 538 else { |
539 nestTypes.push_back(DtoType(vd->type)); | 539 nestTypes.push_back(DtoType(vd->type)); |
540 } | 540 } |
541 } | 541 } |
542 const llvm::StructType* nestSType = llvm::StructType::get(nestTypes); | 542 const llvm::StructType* nestSType = llvm::StructType::get(nestTypes); |
543 Logger::cout() << "nested var struct has type:" << '\n' << *nestSType; | 543 Logger::cout() << "nested var struct has type:" << *nestSType << '\n'; |
544 fd->llvmNested = new llvm::AllocaInst(nestSType,"nestedvars",allocaPoint); | 544 fd->llvmNested = new llvm::AllocaInst(nestSType,"nestedvars",allocaPoint); |
545 if (parentNested) { | 545 if (parentNested) { |
546 assert(fd->llvmThisVar); | 546 assert(fd->llvmThisVar); |
547 llvm::Value* ptr = gIR->ir->CreateBitCast(fd->llvmThisVar, parentNested->getType(), "tmp"); | 547 llvm::Value* ptr = gIR->ir->CreateBitCast(fd->llvmThisVar, parentNested->getType(), "tmp"); |
548 gIR->ir->CreateStore(ptr, DtoGEPi(fd->llvmNested, 0,0, "tmp")); | 548 gIR->ir->CreateStore(ptr, DtoGEPi(fd->llvmNested, 0,0, "tmp")); |