diff gen/toir.cpp @ 172:68a7dd38c03c trunk

[svn r188] Fixed using a dereferenced pointer argument as both l- and r-value. fixes tango.io.FileRoots. Reorganized the tangotests dir a bit.
author lindquist
date Tue, 06 May 2008 07:26:27 +0200
parents 6476da35a0fe
children db9890b3fb64
line wrap: on
line diff
--- a/gen/toir.cpp	Tue May 06 05:25:53 2008 +0200
+++ b/gen/toir.cpp	Tue May 06 07:26:27 2008 +0200
@@ -211,12 +211,6 @@
         // function parameter
         else if (vd->isParameter()) {
             Logger::println("function param");
-            if (!gIR->irDsymbol[vd].getIrValue()) {
-                assert(0); // should be fixed now
-                // TODO: determine this properly
-                // this happens when the DMD frontend generates by pointer wrappers for struct opEquals(S) and opCmp(S)
-                gIR->irDsymbol[vd].getIrValue() = &p->func()->func->getArgumentList().back();
-            }
             if (vd->isRef() || vd->isOut() || DtoIsPassedByRef(vd->type) || llvm::isa<llvm::AllocaInst>(gIR->irDsymbol[vd].getIrValue())) {
                 return new DVarValue(vd, gIR->irDsymbol[vd].getIrValue(), true);
             }
@@ -1371,7 +1365,8 @@
     Type* t = DtoDType(type);
     Type* e1type = DtoDType(e1->type);
 
-    //Logger::print("e1type=%s\n", e1type->toChars());
+    //Logger::println("e1type=%s", e1type->toChars());
+    //Logger::cout() << *DtoType(e1type) << '\n';
 
     if (VarDeclaration* vd = var->isVarDeclaration()) {
         llvm::Value* arrptr;