rjmccall added inline comments.

================
Comment at: lib/CodeGen/CGBlocks.cpp:806
@@ -792,1 +805,3 @@
+      }
+      src = Builder.CreateStructGEP(Addr, Idx, Offset, FD->getName());
     } else {
----------------
Hmm.  It's become increasingly clear that my original decision to expand the 
decl-ref logic here was a mistake.  Please just turn this entire block of 
conditions into:
  if (blockDecl->isConversionFromLambda()) {
    // The lambda capture in a lambda's conversion-to-block-pointer is
    // special; we'll simply emit it directly.
    src = Address::invalid();
  } else {
    DeclRefExpr declRef(
            const_cast<VarDecl *>(variable),
            /*RefersToEnclosingVariableOrCapture*/ CI.isNested(), type,
            VK_LValue, SourceLocation());
    src = EmitDeclRefLValue(&declRef).getAddress();
  }


http://reviews.llvm.org/D19536



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to