Mercurial > projects > ldc
diff gen/tollvm.c @ 31:2841234d2aea trunk
[svn r35] * Attributes on struct fields/methods now work
* Updated object.d to 1.021
* Added -novalidate command line option. this is sometimes useful when debugging as it may let you read the .ll even if it's invalid.
author | lindquist |
---|---|
date | Thu, 04 Oct 2007 16:44:07 +0200 |
parents | 253a5fc4033a |
children | 4648206ca213 |
line wrap: on
line diff
--- a/gen/tollvm.c Thu Oct 04 14:15:54 2007 +0200 +++ b/gen/tollvm.c Thu Oct 04 16:44:07 2007 +0200 @@ -243,7 +243,7 @@ std::vector<const llvm::Type*> paramvec; if (retinptr) { - Logger::print("returning through pointer parameter\n"); + Logger::cout() << "returning through pointer parameter: " << *rettype << '\n'; paramvec.push_back(rettype); } @@ -251,7 +251,8 @@ if (AggregateDeclaration* ad = fdecl->isMember()) { Logger::print("isMember = this is: %s\n", ad->type->toChars()); const llvm::Type* thisty = LLVM_DtoType(ad->type); - if (llvm::isa<llvm::StructType>(thisty)) + Logger::cout() << "this llvm type: " << *thisty << '\n'; + if (llvm::isa<llvm::StructType>(thisty) || thisty == gIR->topstruct().recty.get()) thisty = llvm::PointerType::get(thisty); paramvec.push_back(thisty); usesthis = true;