[PATCH] D58218: Variable auto-init of blocks capturing self after init bugfix
    John McCall via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Feb 13 19:24:52 PST 2019
    
    
  
rjmccall added inline comments.
================
Comment at: lib/CodeGen/CGDecl.cpp:1640
     // Only initialize a __block's storage: we always initialize the header.
-    if (emission.IsEscapingByRef)
+    if (emission.IsEscapingByRef && isa<llvm::AllocaInst>(Loc.getPointer()))
       Loc = emitBlockByrefAddress(Loc, &D, /*follow=*/false);
----------------
This seems like something we're likely regret eventually.  If we've already drilled down to the storage, we should propagate that information into this rather than trying to detect it retroactively here.
Repository:
  rC Clang
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58218/new/
https://reviews.llvm.org/D58218
    
    
More information about the cfe-commits
mailing list