[cfe-commits] r139359 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/PCH/block-decl-merging.c test/PCH/block-decl-merging.cpp

John McCall rjmccall at apple.com
Fri Sep 9 10:11:56 PDT 2011


On Sep 9, 2011, at 9:15 AM, Douglas Gregor wrote:

> 
> On Sep 8, 2011, at 11:44 PM, Argyrios Kyrtzidis wrote:
> 
>> Author: akirtzidis
>> Date: Fri Sep  9 01:44:21 2011
>> New Revision: 139359
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=139359&view=rev
>> Log:
>> Do a lookup for the blocks runtime globals to see if they were declared,
>> instead of codegen waiting to consume such a declaration, which won't
>> happen if that decls are coming from a PCH.
> 
> An alternative would be to hoist NSConcreteGlobalBlockDecl, NSConcreteStackBlockDecl, BlockObjectAssignDecl, and BlockObjectDisposeDecl up into ASTContext, and treat them the same way we treat, e.g., the FILE and jmp_buf type declarations. PCH can then hand them off as "interesting" declarations to the consumer when it loads them.

IR gen is not actually using any information out of these declarations;  I will remove the need for this lookup.

John.



More information about the cfe-commits mailing list