[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

Douglas Gregor dgregor at apple.com
Fri Sep 9 10:12:34 PDT 2011


On Sep 9, 2011, at 10:11 AM, John McCall wrote:

> 
> 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.

Even better! Thanks, John.

	- Doug



More information about the cfe-commits mailing list