comparison 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
comparison
equal deleted inserted replaced
30:881158a93592 31:2841234d2aea
241 241
242 // parameter types 242 // parameter types
243 std::vector<const llvm::Type*> paramvec; 243 std::vector<const llvm::Type*> paramvec;
244 244
245 if (retinptr) { 245 if (retinptr) {
246 Logger::print("returning through pointer parameter\n"); 246 Logger::cout() << "returning through pointer parameter: " << *rettype << '\n';
247 paramvec.push_back(rettype); 247 paramvec.push_back(rettype);
248 } 248 }
249 249
250 if (fdecl->needThis()) { 250 if (fdecl->needThis()) {
251 if (AggregateDeclaration* ad = fdecl->isMember()) { 251 if (AggregateDeclaration* ad = fdecl->isMember()) {
252 Logger::print("isMember = this is: %s\n", ad->type->toChars()); 252 Logger::print("isMember = this is: %s\n", ad->type->toChars());
253 const llvm::Type* thisty = LLVM_DtoType(ad->type); 253 const llvm::Type* thisty = LLVM_DtoType(ad->type);
254 if (llvm::isa<llvm::StructType>(thisty)) 254 Logger::cout() << "this llvm type: " << *thisty << '\n';
255 if (llvm::isa<llvm::StructType>(thisty) || thisty == gIR->topstruct().recty.get())
255 thisty = llvm::PointerType::get(thisty); 256 thisty = llvm::PointerType::get(thisty);
256 paramvec.push_back(thisty); 257 paramvec.push_back(thisty);
257 usesthis = true; 258 usesthis = true;
258 } 259 }
259 else 260 else