d9728222a4 
								
							 
						 
						
							
							
								
								Fix typo, need parens.  
							
							... 
							
							
							
							llvm-svn: 66337 
							
						 
						
							2009-03-07 14:53:10 +00:00  
				
					
						
							
							
								 
						
							
								1ab20cae19 
								
							 
						 
						
							
							
								
								Remove last FIXME for block literal codegen that I know about and turn  
							
							... 
							
							
							
							on all the new code by default.  There is still plenty of testing to
do and issues I'm sure need resolving.  Let me know if you find
anything.
llvm-svn: 66323 
							
						 
						
							2009-03-07 06:16:52 +00:00  
				
					
						
							
							
								 
						
							
								90d8daf592 
								
							 
						 
						
							
							
								
								Remove some FIXMEs for block literals that should be close to working.  
							
							... 
							
							
							
							llvm-svn: 66322 
							
						 
						
							2009-03-07 06:04:31 +00:00  
				
					
						
							
							
								 
						
							
								6f7d9f8774 
								
							 
						 
						
							
							
								
								codegen support for dispose helpers for block literals.  
							
							... 
							
							
							
							llvm-svn: 66320 
							
						 
						
							2009-03-07 02:53:18 +00:00  
				
					
						
							
							
								 
						
							
								aeb0ffd56c 
								
							 
						 
						
							
							
								
								Codegen support for copy helpers for block literals.  
							
							... 
							
							
							
							llvm-svn: 66319 
							
						 
						
							2009-03-07 02:35:30 +00:00  
				
					
						
							
							
								 
						
							
								d6ef62f0bf 
								
							 
						 
						
							
							
								
								Pass the type of the block literal around to make required temporal ordering of code clearer.  
							
							... 
							
							
							
							llvm-svn: 66284 
							
						 
						
							2009-03-06 18:42:23 +00:00  
				
					
						
							
							
								 
						
							
								f89230d93b 
								
							 
						 
						
							
							
								
								Complete __Block_byref_id_object_copy cogegen for block literals.  
							
							... 
							
							
							
							llvm-svn: 66257 
							
						 
						
							2009-03-06 06:12:24 +00:00  
				
					
						
							
							
								 
						
							
								fbe25dd1e4 
								
							 
						 
						
							
							
								
								Finish off __Block_byref_id_object_dispose codegen for block literals.  
							
							... 
							
							
							
							llvm-svn: 66247 
							
						 
						
							2009-03-06 04:53:30 +00:00  
				
					
						
							
							
								 
						
							
								846bf9a797 
								
							 
						 
						
							
							
								
								Remove extra arg.  
							
							... 
							
							
							
							llvm-svn: 66243 
							
						 
						
							2009-03-06 02:45:21 +00:00  
				
					
						
							
							
								 
						
							
								ee2a5ee5f7 
								
							 
						 
						
							
							
								
								More codegen support for the copy/dispose helpers for block literals.  
							
							... 
							
							
							
							llvm-svn: 66241 
							
						 
						
							2009-03-06 02:29:21 +00:00  
				
					
						
							
							
								 
						
							
								0c74327715 
								
							 
						 
						
							
							
								
								Framework for codegen for copy/dispose helpers.  
							
							... 
							
							
							
							llvm-svn: 66231 
							
						 
						
							2009-03-06 01:33:24 +00:00  
				
					
						
							
							
								 
						
							
								4446dcf061 
								
							 
						 
						
							
							
								
								prep work for copy/destroy helpers for block literals.  
							
							... 
							
							
							
							llvm-svn: 66159 
							
						 
						
							2009-03-05 08:32:30 +00:00  
				
					
						
							
							
								 
						
							
								626aecc4be 
								
							 
						 
						
							
							
								
								Add codegen support for __block variables to call _Block_object_dispose as necessary.  
							
							... 
							
							
							
							llvm-svn: 66117 
							
						 
						
							2009-03-05 01:23:13 +00:00  
				
					
						
							
							
								 
						
							
								2d33d6300c 
								
							 
						 
						
							
							
								
								Fixup __block codegen in nested block literals.  
							
							... 
							
							
							
							llvm-svn: 66091 
							
						 
						
							2009-03-04 22:48:06 +00:00  
				
					
						
							
							
								 
						
							
								06acea8a69 
								
							 
						 
						
							
							
								
								Move some of the CodeGenFunction blocks code up and out.  No  
							
							... 
							
							
							
							functionality change.
llvm-svn: 66048 
							
						 
						
							2009-03-04 18:57:26 +00:00  
				
					
						
							
							
								 
						
							
								6c39666a77 
								
							 
						 
						
							
							
								
								Move more of the blocks code up and out.  
							
							... 
							
							
							
							llvm-svn: 66046 
							
						 
						
							2009-03-04 18:47:42 +00:00  
				
					
						
							
							
								 
						
							
								95435674f9 
								
							 
						 
						
							
							
								
								Move more of blocks codegen out of CodeGenModule and into the  
							
							... 
							
							
							
							BlockModule.  No functionality change.  This should help people that
don't want to know anything about blocks not be confused by the
overloaded use of the term block or nor want to see all the blocks
goop.
llvm-svn: 66042 
							
						 
						
							2009-03-04 18:17:45 +00:00  
				
					
						
							
							
								 
						
							
								0874160bd5 
								
							 
						 
						
							
							
								
								Add __block codegen testcase.  We introduce a temporary flag to enable  
							
							... 
							
							
							
							codegen, until such time as codegen is complete enough to turn on with
-fblocks.
llvm-svn: 66031 
							
						 
						
							2009-03-04 13:17:22 +00:00  
				
					
						
							
							
								 
						
							
								97d01d50d9 
								
							 
						 
						
							
							
								
								Improved ABI compliance for __block variables.  No testcases yet as we  
							
							... 
							
							
							
							still give an unsupported error for them due to the fact this is a
work in progress.
llvm-svn: 66007 
							
						 
						
							2009-03-04 03:23:46 +00:00  
				
					
						
							
							
								 
						
							
								dd9427133a 
								
							 
						 
						
							
							
								
								Avoid crash when child iterator gives null result.  
							
							... 
							
							
							
							llvm-svn: 65812 
							
						 
						
							2009-03-02 07:00:57 +00:00  
				
					
						
							
							
								 
						
							
								0e425b8200 
								
							 
						 
						
							
							
								
								Push checking down, also, give the user a hit as to which part of the  
							
							... 
							
							
							
							block literal is causing the problem, instead of the vague reference
to the entire block literal.
llvm-svn: 65798 
							
						 
						
							2009-03-02 03:04:42 +00:00  
				
					
						
							
							
								 
						
							
								5878c797b3 
								
							 
						 
						
							
							
								
								Add BLOCK_HAS_DESCRIPTOR to global blocks.  
							
							... 
							
							
							
							llvm-svn: 65788 
							
						 
						
							2009-03-01 21:09:29 +00:00  
				
					
						
							
							
								 
						
							
								3a139f3793 
								
							 
						 
						
							
							
								
								Be sure to mark blocks with no imports as being global.  
							
							... 
							
							
							
							llvm-svn: 65784 
							
						 
						
							2009-03-01 20:07:53 +00:00  
				
					
						
							
							
								 
						
							
								3113eedc8a 
								
							 
						 
						
							
							
								
								Remove debugging code.  
							
							... 
							
							
							
							llvm-svn: 65753 
							
						 
						
							2009-03-01 02:12:54 +00:00  
				
					
						
							
							
								 
						
							
								961763e35a 
								
							 
						 
						
							
							
								
								Emit errors about unsupported blocks features.  
							
							... 
							
							
							
							llvm-svn: 65751 
							
						 
						
							2009-03-01 01:45:25 +00:00  
				
					
						
							
							
								 
						
							
								ed5e69fe50 
								
							 
						 
						
							
							
								
								Do some blocks cleanup and simplification. Fix a crash, and add a test case.  
							
							... 
							
							
							
							llvm-svn: 65746 
							
						 
						
							2009-03-01 01:09:12 +00:00  
				
					
						
							
							
								 
						
							
								3385fe12ce 
								
							 
						 
						
							
							
								
								improve compatibility with the VC++'08 C++ compiler.  Patch by  
							
							... 
							
							
							
							Niklas Larsson!
llvm-svn: 65706 
							
						 
						
							2009-02-28 19:01:03 +00:00  
				
					
						
							
							
								 
						
							
								1db7d04b71 
								
							 
						 
						
							
							
								
								First cut CodeGen support for __block variables.  
							
							... 
							
							
							
							llvm-svn: 65688 
							
						 
						
							2009-02-28 09:07:16 +00:00  
				
					
						
							
							
								 
						
							
								deaad8cc34 
								
							 
						 
						
							
							
								
								Create a new TypeNodes.def file that enumerates all of the types,  
							
							... 
							
							
							
							giving them rough classifications (normal types, never-canonical
types, always-dependent types, abstract type representations) and
making it far easier to make sure that we've hit all of the cases when
decoding types. 
Switched some switch() statements on the type class over to using this
mechanism, and filtering out those things we don't care about. For
example, CodeGen should never see always-dependent or non-canonical
types, while debug info generation should never see always-dependent
types. More switch() statements on the type class need to be moved 
over to using this approach, so that we'll get warnings when we add a
new type then fail to account for it somewhere in the compiler.
As part of this, some types have been renamed:
  TypeOfExpr -> TypeOfExprType
  FunctionTypeProto -> FunctionProtoType
  FunctionTypeNoProto -> FunctionNoProtoType
There shouldn't be any functionality change...
llvm-svn: 65591 
							
						 
						
							2009-02-26 23:50:07 +00:00  
				
					
						
							
							
								 
						
							
								b750d928ce 
								
							 
						 
						
							
							
								
								CodeGen support for copied BlockDeclRefExprs.  
							
							... 
							
							
							
							llvm-svn: 65487 
							
						 
						
							2009-02-25 23:33:13 +00:00  
				
					
						
							
							
								 
						
							
								b9c9e1d16f 
								
							 
						 
						
							
							
								
								Pass the CodeGenModule object to GenerateBlockFunction, instead of *this (which will call the copy constructor).  
							
							... 
							
							
							
							Also, since we're creating a new CodeGenFunction object for each block function, we don't need to clear the BreakContinueStack.
llvm-svn: 65371 
							
						 
						
							2009-02-24 04:19:41 +00:00  
				
					
						
							
							
								 
						
							
								18e91257e4 
								
							 
						 
						
							
							
								
								Ensure that we can't break or continue out of a block.  
							
							... 
							
							
							
							llvm-svn: 65370 
							
						 
						
							2009-02-24 02:59:30 +00:00  
				
					
						
							
							
								 
						
							
								624497c29a 
								
							 
						 
						
							
							
								
								Cleanp code with some recent suggestions.  
							
							... 
							
							
							
							llvm-svn: 65285 
							
						 
						
							2009-02-22 13:27:11 +00:00  
				
					
						
							
							
								 
						
							
								2ac40a9ff8 
								
							 
						 
						
							
							
								
								The blocks ABI is wrong, add a FIXME.  
							
							... 
							
							
							
							llvm-svn: 65243 
							
						 
						
							2009-02-21 20:07:44 +00:00  
				
					
						
							
							
								 
						
							
								cb2fbcb0c9 
								
							 
						 
						
							
							
								
								Add CodeGen support for the helper for BlockDeclRefExprs.  The easier  
							
							... 
							
							
							
							stuff is mostly done.  Move BlockHasCopyDispose up.
llvm-svn: 65242 
							
						 
						
							2009-02-21 20:00:35 +00:00  
				
					
						
							
							
								 
						
							
								5d2534ada7 
								
							 
						 
						
							
							
								
								More codegen for blocks.  The type of block literals should be better.  
							
							... 
							
							
							
							The size calculation is improved.
llvm-svn: 64994 
							
						 
						
							2009-02-19 01:01:04 +00:00  
				
					
						
							
							
								 
						
							
								eecd39f2d7 
								
							 
						 
						
							
							
								
								Avoid getNameAsCString when the decl doesn't have a name.  
							
							... 
							
							
							
							Build of the parm list with the iterator, not end().
llvm-svn: 64851 
							
						 
						
							2009-02-17 23:25:52 +00:00  
				
					
						
							
							
								 
						
							
								03868f4ea0 
								
							 
						 
						
							
							
								
								Be sure to initialize Name.  
							
							... 
							
							
							
							llvm-svn: 64769 
							
						 
						
							2009-02-17 17:18:36 +00:00  
				
					
						
							
							
								 
						
							
								0e7d7b68c8 
								
							 
						 
						
							
							
								
								Use getNameAsCString instead of getNameAsString and reflow the type.  
							
							... 
							
							
							
							Thanks Anders.
llvm-svn: 64571 
							
						 
						
							2009-02-14 22:49:33 +00:00  
				
					
						
							
							
								 
						
							
								2d5a2878d4 
								
							 
						 
						
							
							
								
								Generate the helper function for blocks.  Now basic codegen is  
							
							... 
							
							
							
							starting to work for blocks.
llvm-svn: 64570 
							
						 
						
							2009-02-14 22:16:35 +00:00  
				
					
						
							
							
								 
						
							
								499ae7ec91 
								
							 
						 
						
							
							
								
								Let the backend unique these.  
							
							... 
							
							
							
							llvm-svn: 64486 
							
						 
						
							2009-02-13 20:17:16 +00:00  
				
					
						
							
							
								 
						
							
								52d9c49d88 
								
							 
						 
						
							
							
								
								Fix spelling.  
							
							... 
							
							
							
							llvm-svn: 64482 
							
						 
						
							2009-02-13 19:38:12 +00:00  
				
					
						
							
							
								 
						
							
								2c867aec40 
								
							 
						 
						
							
							
								
								Move DescriptorUniqueCount into CGM.  
							
							... 
							
							
							
							llvm-svn: 64481 
							
						 
						
							2009-02-13 19:36:03 +00:00  
				
					
						
							
							
								 
						
							
								7ab278db06 
								
							 
						 
						
							
							
								
								Move NSConcreteStackBlock into CGM.  
							
							... 
							
							
							
							llvm-svn: 64479 
							
						 
						
							2009-02-13 19:29:27 +00:00  
				
					
						
							
							
								 
						
							
								10a451cb36 
								
							 
						 
						
							
							
								
								Eliminate an unused variable  
							
							... 
							
							
							
							llvm-svn: 64476 
							
						 
						
							2009-02-13 19:13:32 +00:00  
				
					
						
							
							
								 
						
							
								9319db8a11 
								
							 
						 
						
							
							
								
								Move GlobalUniqueCount up into CGM.  
							
							... 
							
							
							
							llvm-svn: 64473 
							
						 
						
							2009-02-13 18:36:05 +00:00  
				
					
						
							
							
								 
						
							
								971f9b6619 
								
							 
						 
						
							
							
								
								Condense NSConcreteGlobalBlock handling.  
							
							... 
							
							
							
							llvm-svn: 64461 
							
						 
						
							2009-02-13 17:23:42 +00:00  
				
					
						
							
							
								 
						
							
								52197c7763 
								
							 
						 
						
							
							
								
								Calculate size correctly.  
							
							... 
							
							
							
							llvm-svn: 64459 
							
						 
						
							2009-02-13 17:03:17 +00:00  
				
					
						
							
							
								 
						
							
								c2c38331ca 
								
							 
						 
						
							
							
								
								Size should be unsigned.  
							
							... 
							
							
							
							llvm-svn: 64458 
							
						 
						
							2009-02-13 16:55:51 +00:00  
				
					
						
							
							
								 
						
							
								85284bacab 
								
							 
						 
						
							
							
								
								Condense all the blocks code into CGBlocks.cpp.  
							
							... 
							
							
							
							llvm-svn: 64457 
							
						 
						
							2009-02-13 16:19:19 +00:00  
				
					
						
							
							
								 
						
							
								92bbd6d435 
								
							 
						 
						
							
							
								
								Fixup types, the runtime uses int, not int32.  
							
							... 
							
							
							
							llvm-svn: 64456 
							
						 
						
							2009-02-13 16:01:35 +00:00  
				
					
						
							
							
								 
						
							
								b7074c0013 
								
							 
						 
						
							
							
								
								Fixup spacing a tad.  
							
							... 
							
							
							
							llvm-svn: 64454 
							
						 
						
							2009-02-13 15:32:32 +00:00  
				
					
						
							
							
								 
						
							
								005c9a62b5 
								
							 
						 
						
							
							
								
								Move GenericBlockLiteralType into CGM.  
							
							... 
							
							
							
							llvm-svn: 64452 
							
						 
						
							2009-02-13 15:25:34 +00:00  
				
					
						
							
							
								 
						
							
								650c932d80 
								
							 
						 
						
							
							
								
								Move BlockDescriptorType into CGM.  
							
							... 
							
							
							
							llvm-svn: 64451 
							
						 
						
							2009-02-13 15:16:56 +00:00  
				
					
						
							
							
								 
						
							
								6a60fa2428 
								
							 
						 
						
							
							
								
								Add a very basic implemenation of global blocks. This needs to be cleaned up.  
							
							... 
							
							
							
							llvm-svn: 64387 
							
						 
						
							2009-02-12 17:55:02 +00:00  
				
					
						
							
							
								 
						
							
								2437cbfa3b 
								
							 
						 
						
							
							
								
								Add support for generating block call expressions.  
							
							... 
							
							
							
							llvm-svn: 64346 
							
						 
						
							2009-02-12 00:39:25 +00:00