Mike Stump
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
Anders Carlsson
5878c797b3
Add BLOCK_HAS_DESCRIPTOR to global blocks.
...
llvm-svn: 65788
2009-03-01 21:09:29 +00:00
Mike Stump
3a139f3793
Be sure to mark blocks with no imports as being global.
...
llvm-svn: 65784
2009-03-01 20:07:53 +00:00
Anders Carlsson
3113eedc8a
Remove debugging code.
...
llvm-svn: 65753
2009-03-01 02:12:54 +00:00
Anders Carlsson
961763e35a
Emit errors about unsupported blocks features.
...
llvm-svn: 65751
2009-03-01 01:45:25 +00:00
Anders Carlsson
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
Chris Lattner
3385fe12ce
improve compatibility with the VC++'08 C++ compiler. Patch by
...
Niklas Larsson!
llvm-svn: 65706
2009-02-28 19:01:03 +00:00
Mike Stump
1db7d04b71
First cut CodeGen support for __block variables.
...
llvm-svn: 65688
2009-02-28 09:07:16 +00:00
Douglas Gregor
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
Mike Stump
b750d928ce
CodeGen support for copied BlockDeclRefExprs.
...
llvm-svn: 65487
2009-02-25 23:33:13 +00:00
Anders Carlsson
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
Mike Stump
18e91257e4
Ensure that we can't break or continue out of a block.
...
llvm-svn: 65370
2009-02-24 02:59:30 +00:00
Mike Stump
624497c29a
Cleanp code with some recent suggestions.
...
llvm-svn: 65285
2009-02-22 13:27:11 +00:00
Mike Stump
2ac40a9ff8
The blocks ABI is wrong, add a FIXME.
...
llvm-svn: 65243
2009-02-21 20:07:44 +00:00
Mike Stump
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
Mike Stump
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
Mike Stump
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
Mike Stump
03868f4ea0
Be sure to initialize Name.
...
llvm-svn: 64769
2009-02-17 17:18:36 +00:00
Mike Stump
0e7d7b68c8
Use getNameAsCString instead of getNameAsString and reflow the type.
...
Thanks Anders.
llvm-svn: 64571
2009-02-14 22:49:33 +00:00
Mike Stump
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
Mike Stump
499ae7ec91
Let the backend unique these.
...
llvm-svn: 64486
2009-02-13 20:17:16 +00:00
Mike Stump
52d9c49d88
Fix spelling.
...
llvm-svn: 64482
2009-02-13 19:38:12 +00:00
Mike Stump
2c867aec40
Move DescriptorUniqueCount into CGM.
...
llvm-svn: 64481
2009-02-13 19:36:03 +00:00
Mike Stump
7ab278db06
Move NSConcreteStackBlock into CGM.
...
llvm-svn: 64479
2009-02-13 19:29:27 +00:00
Douglas Gregor
10a451cb36
Eliminate an unused variable
...
llvm-svn: 64476
2009-02-13 19:13:32 +00:00
Mike Stump
9319db8a11
Move GlobalUniqueCount up into CGM.
...
llvm-svn: 64473
2009-02-13 18:36:05 +00:00
Mike Stump
971f9b6619
Condense NSConcreteGlobalBlock handling.
...
llvm-svn: 64461
2009-02-13 17:23:42 +00:00
Mike Stump
52197c7763
Calculate size correctly.
...
llvm-svn: 64459
2009-02-13 17:03:17 +00:00
Mike Stump
c2c38331ca
Size should be unsigned.
...
llvm-svn: 64458
2009-02-13 16:55:51 +00:00
Mike Stump
85284bacab
Condense all the blocks code into CGBlocks.cpp.
...
llvm-svn: 64457
2009-02-13 16:19:19 +00:00
Mike Stump
92bbd6d435
Fixup types, the runtime uses int, not int32.
...
llvm-svn: 64456
2009-02-13 16:01:35 +00:00
Mike Stump
b7074c0013
Fixup spacing a tad.
...
llvm-svn: 64454
2009-02-13 15:32:32 +00:00
Mike Stump
005c9a62b5
Move GenericBlockLiteralType into CGM.
...
llvm-svn: 64452
2009-02-13 15:25:34 +00:00
Mike Stump
650c932d80
Move BlockDescriptorType into CGM.
...
llvm-svn: 64451
2009-02-13 15:16:56 +00:00
Anders Carlsson
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
Anders Carlsson
2437cbfa3b
Add support for generating block call expressions.
...
llvm-svn: 64346
2009-02-12 00:39:25 +00:00